Skip to content

Commit 80a0f53

Browse files
simonljusCode-Hex
authored andcommitted
should not contain typename
1 parent 6024005 commit 80a0f53

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/myzod/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,7 @@ export class MyZodSchemaVisitor extends BaseSchemaVisitor {
9292
.export()
9393
.asKind('function')
9494
.withName(`${name}Schema(): myzod.Type<${name}>`)
95-
.withBlock(
96-
[
97-
indent(`return myzod.object({`),
98-
indent(`__typename: myzod.literal('${node.name.value}').optional(),`, 2),
99-
shape,
100-
indent('})'),
101-
].join('\n')
102-
).string + appendArguments
95+
.withBlock([indent(`return myzod.object({`), shape, indent('})')].join('\n')).string + appendArguments
10396
);
10497
}
10598
}),

0 commit comments

Comments
 (0)