Skip to content

Commit 5235448

Browse files
refactor: cast options and db to any for improved type handling in adapter functions
1 parent 3ec1c3c commit 5235448

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/adapters/create/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ export function createAdapter<
310310
}
311311

312312
const adapterInstance = adapter({
313-
options,
313+
options: options as any,
314314
schema,
315315
debugLog,
316316
getFieldName,
@@ -478,7 +478,7 @@ export function createAdapter<
478478
select,
479479
model: unsafe_model,
480480
schema,
481-
options,
481+
options: options as any,
482482
})
483483
}
484484

src/adapters/kysely/dialect.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export async function createKyselyAdapter<T extends Record<string, any>>(config:
6666

6767
let dialect: Dialect | undefined
6868

69-
const databaseType = getDatabaseType(db)
69+
const databaseType = getDatabaseType(db as any)
7070

7171
if ('createDriver' in db) {
7272
dialect = db

src/adapters/memory/memory-adapter.ts

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ export function memoryAdapter<
7575
data,
7676
}) => {
7777
if (options.advanced?.database?.useNumberId) {
78-
// @ts-expect-error - Dynamically adding id property to data object
7978
data.id = db[model].length + 1
8079
}
8180
db[model].push(data)

0 commit comments

Comments
 (0)