mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Ensure factory symbol remains unused in react-jsx mode when not referenced in user code (#41905)
This commit is contained in:
@@ -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