We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9dce32 commit 90e66c7Copy full SHA for 90e66c7
packages/dts-generator/src/phases/dts-code-gen.ts
@@ -632,7 +632,8 @@ function genField(ast: Variable) {
632
text += ast.static ? "static " : "";
633
text += ast.readonly ? "readonly " : "";
634
text +=
635
- `${ast.name} : ${ast.type ? genType(ast.type, "property") : "any"}` + NL;
+ `${ast.name}${ast.optional ? "?" : ""} : ${ast.type ? genType(ast.type, "property") : "any"}` +
636
+ NL;
637
return text;
638
}
639
0 commit comments