Skip to content

Commit 5031a1b

Browse files
authored
fix: Properly exclude Zapatos types from Kysely types (#3)
* fix: Properly exclude Zapatos types from Kysely types * refactor: Remove unnecessary type from union * fix: import
1 parent da3ef59 commit 5031a1b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/templates/kysely-types.template.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
export default `import { ColumnType, Kysely } from "kysely"
22
import * as schema from "zapatos/schema"
3-
import { SQLFragment } from "zapatos/db"
3+
import { Parameter, SQLFragment } from "zapatos/db"
44
5-
type ZapatosInsertableTypeToPrimitive<T> = Exclude<T, symbol | SQLFragment>
5+
type ZapatosInsertableTypeToPrimitive<T> = Exclude<
6+
T,
7+
symbol | SQLFragment<any, any> | Parameter
8+
>
69
710
export type ZapatosTableNameToKyselySchema<T extends schema.Table> = {
811
[K in keyof schema.SelectableForTable<T>]: ColumnType<

0 commit comments

Comments
 (0)