From acfdd68d6afb13444ffc78351225ef6254f1ad86 Mon Sep 17 00:00:00 2001 From: Matt Rossman <22670878+mattrossman@users.noreply.github.com> Date: Thu, 4 May 2023 15:47:11 -0400 Subject: [PATCH] Use satisfies instead of type annotation --- src/transformer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformer.ts b/src/transformer.ts index a6fb72e..7e27ff8 100644 --- a/src/transformer.ts +++ b/src/transformer.ts @@ -304,7 +304,7 @@ export default class Transformer { name = `${name}Type`; } const end = `export const ${exportName}ObjectSchema = Schema`; - return `const Schema: z.ZodType = ${schema};\n\n ${end}`; + return `const Schema = ${schema} satisfies z.ZodType;\n\n ${end}`; } addFinalWrappers({ zodStringFields }: { zodStringFields: string[] }) {