Skip to content

Commit

Permalink
fix: Properly exclude Zapatos types from Kysely types (#3)
Browse files Browse the repository at this point in the history
* fix: Properly exclude Zapatos types from Kysely types

* refactor: Remove unnecessary type from union

* fix: import
  • Loading branch information
louis-pre authored Jan 2, 2025
1 parent da3ef59 commit 5031a1b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/templates/kysely-types.template.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
export default `import { ColumnType, Kysely } from "kysely"
import * as schema from "zapatos/schema"
import { SQLFragment } from "zapatos/db"
import { Parameter, SQLFragment } from "zapatos/db"
type ZapatosInsertableTypeToPrimitive<T> = Exclude<T, symbol | SQLFragment>
type ZapatosInsertableTypeToPrimitive<T> = Exclude<
T,
symbol | SQLFragment<any, any> | Parameter
>
export type ZapatosTableNameToKyselySchema<T extends schema.Table> = {
[K in keyof schema.SelectableForTable<T>]: ColumnType<
Expand Down

0 comments on commit 5031a1b

Please sign in to comment.