Skip to content

Commit

Permalink
Resolves omar-dulaimi#88 - satisfies type instead of inferring
Browse files Browse the repository at this point in the history
  • Loading branch information
owenr88 committed Oct 27, 2023
1 parent 1460772 commit a2616ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export default class Transformer {
name = `${name}Type`;
}
const end = `export const ${exportName}ObjectSchema = Schema`;
return `const Schema: z.ZodType<Prisma.${name}> = ${schema};\n\n ${end}`;
return `const Schema = ${schema} satisfies z.ZodType<Prisma.${name}>;\n\n ${end}`;
}

addFinalWrappers({ zodStringFields }: { zodStringFields: string[] }) {
Expand Down

0 comments on commit a2616ee

Please sign in to comment.