fix(48657): allow JSXElement names to be IdentifierNames (#48661)

This commit is contained in:
Oleksandr T
2022-04-13 22:32:10 +03:00
committed by GitHub
parent a027cfa8ac
commit 73c93eec5c
7 changed files with 113 additions and 31 deletions

View File

@@ -3112,7 +3112,10 @@ namespace ts {
return (parent as BindingElement | ImportSpecifier).propertyName === node;
case SyntaxKind.ExportSpecifier:
case SyntaxKind.JsxAttribute:
// Any name in an export specifier or JSX Attribute
case SyntaxKind.JsxSelfClosingElement:
case SyntaxKind.JsxOpeningElement:
case SyntaxKind.JsxClosingElement:
// Any name in an export specifier or JSX Attribute or Jsx Element
return true;
}
return false;