Ensure factory symbol remains unused in react-jsx mode when not referenced in user code (#41905)

This commit is contained in:
Wesley Wigham authored and GitHub committed 2020-12-16 13:11:48 -08:00
1 parent 4b8b0c861e
commit 675cd4d7ce
10 files changed
+184

No files matched your search

+3
View File
@@ -26955,6 +26955,9 @@ namespace ts {
errorOutputContainer);
function checkTagNameDoesNotExpectTooManyArguments(): boolean {
if (getJsxNamespaceContainerForImplicitImport(node)) {
return true; // factory is implicitly jsx/jsxdev - assume it fits the bill, since we don't strongly look for the jsx/jsxs/jsxDEV factory APIs anywhere else (at least not yet)
}
const tagType = isJsxOpeningElement(node) || isJsxSelfClosingElement(node) && !isJsxIntrinsicIdentifier(node.tagName) ? checkExpression(node.tagName) : undefined;
if (!tagType) {
return true;