Skip to content

Commit 72f74ce

Browse files
committed
allow missing fields of nested field
1 parent 91f915f commit 72f74ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/code-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function generateOptionalTypeDefinitionCode(typeInfo: TypeInfo): string {
2424
const joinedPropDefinitions = fields
2525
.map((field) => {
2626
const comment = field.comment ? ` ${field.comment}` : '';
27-
return `${comment} ${field.name}: ${field.typeString};`;
27+
return `${comment} ${field.name}?: ${field.typeString};`;
2828
})
2929
.join('\n');
3030
return `

0 commit comments

Comments
 (0)