Skip to content

Commit 874ddd9

Browse files
LéoLéo
authored andcommitted
chore(template-fastify): update zod utility schemes
1 parent d0af550 commit 874ddd9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

templates/fastify/src/core/schema.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ export type ZodRestrictFieldsShape<Target> = {
99
};
1010

1111
export type ZodUnrestrictShape<Target> = {
12-
[K in keyof Target]?: ZodType<Target[K]>;
12+
[K in keyof Target | (string & {})]?: K extends keyof Target
13+
? ZodType<Target[K]>
14+
: ZodTypeAny;
1315
};
1416

1517
export type ZodUnrestrictFieldsShape<Target> = {
16-
[K in keyof Target]?: ZodTypeAny;
18+
[K in keyof Target | (string & {})]?: ZodTypeAny;
1719
};

0 commit comments

Comments
 (0)