Skip to content

Commit 20ec8a2

Browse files
committed
fix: add explicit types to schemas
1 parent 05b2f1d commit 20ec8a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function isZodType(arg: unknown): arg is z.ZodTypeAny {
1212
return Boolean(prototype && Reflect.get(prototype, 'name') === 'ZodType');
1313
}
1414

15-
export const $BooleanLike = z.preprocess((arg) => {
15+
export const $BooleanLike: z.ZodType<boolean, z.ZodTypeDef, any> = z.preprocess((arg) => {
1616
if (typeof arg === 'string') {
1717
if (arg.trim().toLowerCase() === 'true') {
1818
return true;
@@ -23,7 +23,7 @@ export const $BooleanLike = z.preprocess((arg) => {
2323
return arg;
2424
}, z.boolean());
2525

26-
export const $NumberLike = z.preprocess((arg) => {
26+
export const $NumberLike: z.ZodType<number, z.ZodTypeDef, any> = z.preprocess((arg) => {
2727
if (isNumberLike(arg)) {
2828
return parseNumber(arg);
2929
}

0 commit comments

Comments
 (0)