sebastianwessel / surrealdb-client-generator

Tool which generates a typescript client for SurrealDB and zod schema of a given database
MIT License
76 stars 12 forks source link

Fix generic #40

Closed hammo92 closed 3 months ago

hammo92 commented 3 months ago

The string literal used for creating the recordId zod type had return z.custom<RecordId<\`$Table \`>> which was causing all records to expect the table value $Table; this seems to be an issue with Zod's type inference. Changed to <Table> to pass the generic correctly