mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Ensure factory symbol remains unused in react-jsx mode when not referenced in user code (#41905)
This commit is contained in:
1 parent
4b8b0c861e
commit
675cd4d7ce
10 files changed
+184
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user