Skip to content

Commit f1e53da

Browse files
Update LKG
1 parent ca766df commit f1e53da

File tree

6 files changed

+126
-114
lines changed

6 files changed

+126
-114
lines changed

lib/tsc.js

+16-14
Original file line numberDiff line numberDiff line change
@@ -55286,10 +55286,10 @@ var ts;
5528655286
return links.jsxNamespace;
5528755287
}
5528855288
if (!links || links.jsxNamespace !== false) {
55289-
var namespaceName = getJsxNamespace(location);
55290-
var resolvedNamespace = resolveName(location, namespaceName, 1920, undefined, namespaceName, false);
55289+
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
5529155290
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
55292-
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
55291+
var namespaceName = getJsxNamespace(location);
55292+
resolvedNamespace = resolveName(location, namespaceName, 1920, undefined, namespaceName, false);
5529355293
}
5529455294
if (resolvedNamespace) {
5529555295
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920));
@@ -55457,17 +55457,19 @@ var ts;
5545755457
checkGrammarJsxElement(node);
5545855458
}
5545955459
checkJsxPreconditions(node);
55460-
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
55461-
var jsxFactoryNamespace = getJsxNamespace(node);
55462-
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
55463-
var jsxFactorySym;
55464-
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
55465-
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551, jsxFactoryRefErr, jsxFactoryNamespace, true);
55466-
}
55467-
if (jsxFactorySym) {
55468-
jsxFactorySym.isReferenced = 67108863;
55469-
if (jsxFactorySym.flags & 2097152 && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
55470-
markAliasSymbolAsReferenced(jsxFactorySym);
55460+
if (!getJsxNamespaceContainerForImplicitImport(node)) {
55461+
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
55462+
var jsxFactoryNamespace = getJsxNamespace(node);
55463+
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
55464+
var jsxFactorySym = void 0;
55465+
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
55466+
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551, jsxFactoryRefErr, jsxFactoryNamespace, true);
55467+
}
55468+
if (jsxFactorySym) {
55469+
jsxFactorySym.isReferenced = 67108863;
55470+
if (jsxFactorySym.flags & 2097152 && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
55471+
markAliasSymbolAsReferenced(jsxFactorySym);
55472+
}
5547155473
}
5547255474
}
5547355475
if (isNodeOpeningLikeElement) {

lib/tsserver.js

+22-20
Original file line numberDiff line numberDiff line change
@@ -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) {

lib/tsserverlibrary.js

+22-20
Original file line numberDiff line numberDiff line change
@@ -66522,10 +66522,10 @@ var ts;
6652266522
return links.jsxNamespace;
6652366523
}
6652466524
if (!links || links.jsxNamespace !== false) {
66525-
var namespaceName = getJsxNamespace(location);
66526-
var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
66525+
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
6652766526
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
66528-
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
66527+
var namespaceName = getJsxNamespace(location);
66528+
resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
6652966529
}
6653066530
if (resolvedNamespace) {
6653166531
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
@@ -66732,23 +66732,25 @@ var ts;
6673266732
checkGrammarJsxElement(node);
6673366733
}
6673466734
checkJsxPreconditions(node);
66735-
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
66736-
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
66737-
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
66738-
var jsxFactoryNamespace = getJsxNamespace(node);
66739-
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
66740-
// allow null as jsxFragmentFactory
66741-
var jsxFactorySym;
66742-
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
66743-
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
66744-
}
66745-
if (jsxFactorySym) {
66746-
// Mark local symbol as referenced here because it might not have been marked
66747-
// if jsx emit was not jsxFactory as there wont be error being emitted
66748-
jsxFactorySym.isReferenced = 67108863 /* All */;
66749-
// If react/jsxFactory symbol is alias, mark it as refereced
66750-
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
66751-
markAliasSymbolAsReferenced(jsxFactorySym);
66735+
if (!getJsxNamespaceContainerForImplicitImport(node)) {
66736+
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
66737+
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
66738+
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
66739+
var jsxFactoryNamespace = getJsxNamespace(node);
66740+
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
66741+
// allow null as jsxFragmentFactory
66742+
var jsxFactorySym = void 0;
66743+
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
66744+
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
66745+
}
66746+
if (jsxFactorySym) {
66747+
// Mark local symbol as referenced here because it might not have been marked
66748+
// if jsx emit was not jsxFactory as there wont be error being emitted
66749+
jsxFactorySym.isReferenced = 67108863 /* All */;
66750+
// If react/jsxFactory symbol is alias, mark it as refereced
66751+
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
66752+
markAliasSymbolAsReferenced(jsxFactorySym);
66753+
}
6675266754
}
6675366755
}
6675466756
if (isNodeOpeningLikeElement) {

lib/typescript.js

+22-20
Original file line numberDiff line numberDiff line change
@@ -66522,10 +66522,10 @@ var ts;
6652266522
return links.jsxNamespace;
6652366523
}
6652466524
if (!links || links.jsxNamespace !== false) {
66525-
var namespaceName = getJsxNamespace(location);
66526-
var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
66525+
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
6652766526
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
66528-
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
66527+
var namespaceName = getJsxNamespace(location);
66528+
resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
6652966529
}
6653066530
if (resolvedNamespace) {
6653166531
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
@@ -66732,23 +66732,25 @@ var ts;
6673266732
checkGrammarJsxElement(node);
6673366733
}
6673466734
checkJsxPreconditions(node);
66735-
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
66736-
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
66737-
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
66738-
var jsxFactoryNamespace = getJsxNamespace(node);
66739-
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
66740-
// allow null as jsxFragmentFactory
66741-
var jsxFactorySym;
66742-
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
66743-
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
66744-
}
66745-
if (jsxFactorySym) {
66746-
// Mark local symbol as referenced here because it might not have been marked
66747-
// if jsx emit was not jsxFactory as there wont be error being emitted
66748-
jsxFactorySym.isReferenced = 67108863 /* All */;
66749-
// If react/jsxFactory symbol is alias, mark it as refereced
66750-
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
66751-
markAliasSymbolAsReferenced(jsxFactorySym);
66735+
if (!getJsxNamespaceContainerForImplicitImport(node)) {
66736+
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
66737+
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
66738+
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
66739+
var jsxFactoryNamespace = getJsxNamespace(node);
66740+
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
66741+
// allow null as jsxFragmentFactory
66742+
var jsxFactorySym = void 0;
66743+
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
66744+
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
66745+
}
66746+
if (jsxFactorySym) {
66747+
// Mark local symbol as referenced here because it might not have been marked
66748+
// if jsx emit was not jsxFactory as there wont be error being emitted
66749+
jsxFactorySym.isReferenced = 67108863 /* All */;
66750+
// If react/jsxFactory symbol is alias, mark it as refereced
66751+
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
66752+
markAliasSymbolAsReferenced(jsxFactorySym);
66753+
}
6675266754
}
6675366755
}
6675466756
if (isNodeOpeningLikeElement) {

lib/typescriptServices.js

+22-20
Original file line numberDiff line numberDiff line change
@@ -66522,10 +66522,10 @@ var ts;
6652266522
return links.jsxNamespace;
6652366523
}
6652466524
if (!links || links.jsxNamespace !== false) {
66525-
var namespaceName = getJsxNamespace(location);
66526-
var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
66525+
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
6652766526
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
66528-
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
66527+
var namespaceName = getJsxNamespace(location);
66528+
resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
6652966529
}
6653066530
if (resolvedNamespace) {
6653166531
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
@@ -66732,23 +66732,25 @@ var ts;
6673266732
checkGrammarJsxElement(node);
6673366733
}
6673466734
checkJsxPreconditions(node);
66735-
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
66736-
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
66737-
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
66738-
var jsxFactoryNamespace = getJsxNamespace(node);
66739-
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
66740-
// allow null as jsxFragmentFactory
66741-
var jsxFactorySym;
66742-
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
66743-
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
66744-
}
66745-
if (jsxFactorySym) {
66746-
// Mark local symbol as referenced here because it might not have been marked
66747-
// if jsx emit was not jsxFactory as there wont be error being emitted
66748-
jsxFactorySym.isReferenced = 67108863 /* All */;
66749-
// If react/jsxFactory symbol is alias, mark it as refereced
66750-
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
66751-
markAliasSymbolAsReferenced(jsxFactorySym);
66735+
if (!getJsxNamespaceContainerForImplicitImport(node)) {
66736+
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
66737+
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
66738+
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
66739+
var jsxFactoryNamespace = getJsxNamespace(node);
66740+
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
66741+
// allow null as jsxFragmentFactory
66742+
var jsxFactorySym = void 0;
66743+
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
66744+
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
66745+
}
66746+
if (jsxFactorySym) {
66747+
// Mark local symbol as referenced here because it might not have been marked
66748+
// if jsx emit was not jsxFactory as there wont be error being emitted
66749+
jsxFactorySym.isReferenced = 67108863 /* All */;
66750+
// If react/jsxFactory symbol is alias, mark it as refereced
66751+
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
66752+
markAliasSymbolAsReferenced(jsxFactorySym);
66753+
}
6675266754
}
6675366755
}
6675466756
if (isNodeOpeningLikeElement) {

0 commit comments

Comments
 (0)