Skip to content

Commit 28b3400

Browse files
simonljusCode-Hex
authored andcommitted
case for ScalarTypeDefinition
1 parent 6ee7b36 commit 28b3400

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/zod/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,12 @@ function generateNameNodeZodSchema(config: ValidationSchemaPluginConfig, visitor
339339
}
340340
case 'EnumTypeDefinition':
341341
return `${converter.convertName()}Schema`;
342+
case 'ScalarTypeDefinition':
343+
return zod4Scalar(config, visitor, node.value);
342344
default:
345+
if (converter?.targetKind) {
346+
console.warn('Unknown targetKind', converter?.targetKind);
347+
}
343348
return zod4Scalar(config, visitor, node.value);
344349
}
345350
}

0 commit comments

Comments
 (0)