mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-09 16:39:46 -05:00
Only give suggestions when the name is an identifier.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user