Allow JSXAttribute to be IdentifierName (#17466)

* Add test

* Fix #17452 - Allow JSXAttribute names to be IdentifierNames

* Move check into isIdentifierName
This commit is contained in:
Wesley Wigham
2017-07-31 13:03:26 -07:00
committed by GitHub
parent 32d9292a83
commit c73fdc87d0
5 changed files with 78 additions and 1 deletions
+2 -1
View File
@@ -1781,7 +1781,8 @@ namespace ts {
// Property name in binding element or import specifier
return (<BindingElement | ImportSpecifier>parent).propertyName === node;
case SyntaxKind.ExportSpecifier:
// Any name in an export specifier
case SyntaxKind.JsxAttribute:
// Any name in an export specifier or JSX Attribute
return true;
}
return false;