Skip to content

Commit

Permalink
fix (generator): let generated client import types using TypeScript's…
Browse files Browse the repository at this point in the history
… import type (#710)

This PR fixes #707 by explicitly importing types using `import type`
instead of just `import`.
  • Loading branch information
kevin-dp committed Nov 30, 2023
1 parent fb773fb commit 65f10d6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tasty-lizards-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@electric-sql/prisma-generator": patch
---

Import types using import type in generated Electric client.
2 changes: 1 addition & 1 deletion generator/src/functions/writeSingleFileImportStatements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const writeSingleFileImportStatements: WriteStatements = (
}

writeImport(
`{ TableSchema, DbSchema, Relation, ElectricClient, HKT }`,
`{ type TableSchema, DbSchema, Relation, ElectricClient, type HKT }`,
'electric-sql/client/model'
)

Expand Down

0 comments on commit 65f10d6

Please sign in to comment.