@@ -66328,10 +66328,10 @@ var ts;
6632866328 return links.jsxNamespace;
6632966329 }
6633066330 if (!links || links.jsxNamespace !== false) {
66331- var namespaceName = getJsxNamespace(location);
66332- var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
66331+ var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
6633366332 if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
66334- resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
66333+ var namespaceName = getJsxNamespace(location);
66334+ resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
6633566335 }
6633666336 if (resolvedNamespace) {
6633766337 var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
@@ -66538,23 +66538,25 @@ var ts;
6653866538 checkGrammarJsxElement(node);
6653966539 }
6654066540 checkJsxPreconditions(node);
66541- // The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
66542- // And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
66543- var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
66544- var jsxFactoryNamespace = getJsxNamespace(node);
66545- var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
66546- // allow null as jsxFragmentFactory
66547- var jsxFactorySym;
66548- if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
66549- jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
66550- }
66551- if (jsxFactorySym) {
66552- // Mark local symbol as referenced here because it might not have been marked
66553- // if jsx emit was not jsxFactory as there wont be error being emitted
66554- jsxFactorySym.isReferenced = 67108863 /* All */;
66555- // If react/jsxFactory symbol is alias, mark it as refereced
66556- if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
66557- markAliasSymbolAsReferenced(jsxFactorySym);
66541+ if (!getJsxNamespaceContainerForImplicitImport(node)) {
66542+ // The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
66543+ // And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
66544+ var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
66545+ var jsxFactoryNamespace = getJsxNamespace(node);
66546+ var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
66547+ // allow null as jsxFragmentFactory
66548+ var jsxFactorySym = void 0;
66549+ if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
66550+ jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
66551+ }
66552+ if (jsxFactorySym) {
66553+ // Mark local symbol as referenced here because it might not have been marked
66554+ // if jsx emit was not jsxFactory as there wont be error being emitted
66555+ jsxFactorySym.isReferenced = 67108863 /* All */;
66556+ // If react/jsxFactory symbol is alias, mark it as refereced
66557+ if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
66558+ markAliasSymbolAsReferenced(jsxFactorySym);
66559+ }
6655866560 }
6655966561 }
6656066562 if (isNodeOpeningLikeElement) {
0 commit comments