mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Fix comment
This commit is contained in:
@@ -1047,7 +1047,8 @@ module ts {
|
||||
// Emit identifier as an identifier
|
||||
emit(node.name);
|
||||
write(": ");
|
||||
// Even though this is stored as identified because it is in short-hand property assignment, treated it as expression
|
||||
// Even though this is stored as identified because it is in short-hand property assignment,
|
||||
// treated it as expression
|
||||
emitExpressionIdentifier(node.name);
|
||||
emitTrailingComments(node);
|
||||
}
|
||||
|
||||
@@ -2687,6 +2687,7 @@ module ts {
|
||||
(<PropertyDeclaration>node).initializer = makeFunctionExpression(SyntaxKind.FunctionExpression, node.pos, undefined, sig, body);
|
||||
return finishNode(node);
|
||||
}
|
||||
// Disallow optional property assignment
|
||||
if (token === SyntaxKind.QuestionToken) {
|
||||
var questionStart = scanner.getTokenPos();
|
||||
grammarErrorAtPos(questionStart, scanner.getStartPos() - questionStart, Diagnostics.A_object_member_cannot_be_declared_optional);
|
||||
|
||||
Reference in New Issue
Block a user