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 1447081 commit 6571659Copy full SHA for 6571659
src/module-declaration.ts
@@ -272,7 +272,8 @@ export const generateModuleDeclaration = (
272
module.instanceProperties
273
.sort((a, b) => a.name.localeCompare(b.name))
274
.forEach(prop => {
275
- moduleAPI.push(`${prop.name}: ${utils.typify(prop)};`);
+ const isOptional = !prop.required ? '?' : '';
276
+ moduleAPI.push(`${prop.name}${isOptional}: ${utils.typify(prop)};`);
277
});
278
}
279
0 commit comments