Only give suggestions when the name is an identifier.

This commit is contained in:
Daniel Rosenwasser
2017-08-18 15:58:31 -07:00
parent 8b10ea4c1d
commit 7cc6bfc985

View File

@@ -9074,9 +9074,9 @@ namespace ts {
errorNode = propDeclaration;
const propNameNode = propDeclaration.name as Identifier;
Debug.assertNode(propNameNode, isIdentifier);
suggestion = getSuggestionForNonexistentProperty(propNameNode, target);
if (isIdentifier(propDeclaration.name)) {
suggestion = getSuggestionForNonexistentProperty(propDeclaration.name, target);
}
}
if (suggestion !== undefined) {