File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,10 @@ export class ZodSchemaVisitor extends BaseSchemaVisitor {
87
87
leave : InterfaceTypeDefinitionBuilder ( this . config . withObjectType , ( node : InterfaceTypeDefinitionNode ) => {
88
88
const visitor = this . createVisitor ( 'output' ) ;
89
89
const name = visitor . convertName ( node . name . value ) ;
90
+ const functionName = visitor . convertName ( node . name . value , {
91
+ useTypesPrefix : false ,
92
+ useTypesSuffix : false ,
93
+ } ) ;
90
94
const typeName = visitor . prefixTypeNamespace ( name ) ;
91
95
this . importTypes . push ( name ) ;
92
96
@@ -114,7 +118,7 @@ export class ZodSchemaVisitor extends BaseSchemaVisitor {
114
118
new DeclarationBlock ( { } )
115
119
. export ( )
116
120
. asKind ( 'function' )
117
- . withName ( `${ name } Schema(): z.ZodObject<Properties<${ typeName } >>` )
121
+ . withName ( `${ functionName } Schema(): z.ZodObject<Properties<${ typeName } >>` )
118
122
. withBlock ( [ indent ( `return z.object({` ) , shape , indent ( '})' ) ] . join ( '\n' ) )
119
123
. string + appendArguments
120
124
) ;
You can’t perform that action at this time.
0 commit comments