We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d66377d commit a11f72fCopy full SHA for a11f72f
src/compiler/declarationEmitter.ts
@@ -1129,7 +1129,7 @@ namespace ts {
1129
// what we want, namely the name expression enclosed in brackets.
1130
writeTextOfNode(currentText, node.name);
1131
// If optional property emit ?
1132
- if ((node.kind === SyntaxKind.PropertyDeclaration || node.kind === SyntaxKind.PropertySignature) && hasQuestionToken(node)) {
+ if ((node.kind === SyntaxKind.PropertyDeclaration || node.kind === SyntaxKind.PropertySignature || node.kind === SyntaxKind.Parameter) && hasQuestionToken(node)) {
1133
write("?");
1134
}
1135
if ((node.kind === SyntaxKind.PropertyDeclaration || node.kind === SyntaxKind.PropertySignature) && node.parent.kind === SyntaxKind.TypeLiteral) {
0 commit comments