mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Update LKG
This commit is contained in:
+16
-14
@@ -55286,10 +55286,10 @@ var ts;
|
||||
return links.jsxNamespace;
|
||||
}
|
||||
if (!links || links.jsxNamespace !== false) {
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
var resolvedNamespace = resolveName(location, namespaceName, 1920, undefined, namespaceName, false);
|
||||
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
|
||||
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
resolvedNamespace = resolveName(location, namespaceName, 1920, undefined, namespaceName, false);
|
||||
}
|
||||
if (resolvedNamespace) {
|
||||
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920));
|
||||
@@ -55457,17 +55457,19 @@ var ts;
|
||||
checkGrammarJsxElement(node);
|
||||
}
|
||||
checkJsxPreconditions(node);
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
var jsxFactorySym;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551, jsxFactoryRefErr, jsxFactoryNamespace, true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
jsxFactorySym.isReferenced = 67108863;
|
||||
if (jsxFactorySym.flags & 2097152 && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
if (!getJsxNamespaceContainerForImplicitImport(node)) {
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
var jsxFactorySym = void 0;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551, jsxFactoryRefErr, jsxFactoryNamespace, true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
jsxFactorySym.isReferenced = 67108863;
|
||||
if (jsxFactorySym.flags & 2097152 && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isNodeOpeningLikeElement) {
|
||||
|
||||
+22
-20
@@ -66328,10 +66328,10 @@ var ts;
|
||||
return links.jsxNamespace;
|
||||
}
|
||||
if (!links || links.jsxNamespace !== false) {
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
|
||||
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
}
|
||||
if (resolvedNamespace) {
|
||||
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
|
||||
@@ -66538,23 +66538,25 @@ var ts;
|
||||
checkGrammarJsxElement(node);
|
||||
}
|
||||
checkJsxPreconditions(node);
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
if (!getJsxNamespaceContainerForImplicitImport(node)) {
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym = void 0;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isNodeOpeningLikeElement) {
|
||||
|
||||
+22
-20
@@ -66522,10 +66522,10 @@ var ts;
|
||||
return links.jsxNamespace;
|
||||
}
|
||||
if (!links || links.jsxNamespace !== false) {
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
|
||||
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
}
|
||||
if (resolvedNamespace) {
|
||||
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
|
||||
@@ -66732,23 +66732,25 @@ var ts;
|
||||
checkGrammarJsxElement(node);
|
||||
}
|
||||
checkJsxPreconditions(node);
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
if (!getJsxNamespaceContainerForImplicitImport(node)) {
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym = void 0;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isNodeOpeningLikeElement) {
|
||||
|
||||
+22
-20
@@ -66522,10 +66522,10 @@ var ts;
|
||||
return links.jsxNamespace;
|
||||
}
|
||||
if (!links || links.jsxNamespace !== false) {
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
|
||||
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
}
|
||||
if (resolvedNamespace) {
|
||||
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
|
||||
@@ -66732,23 +66732,25 @@ var ts;
|
||||
checkGrammarJsxElement(node);
|
||||
}
|
||||
checkJsxPreconditions(node);
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
if (!getJsxNamespaceContainerForImplicitImport(node)) {
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym = void 0;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isNodeOpeningLikeElement) {
|
||||
|
||||
+22
-20
@@ -66522,10 +66522,10 @@ var ts;
|
||||
return links.jsxNamespace;
|
||||
}
|
||||
if (!links || links.jsxNamespace !== false) {
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
|
||||
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
}
|
||||
if (resolvedNamespace) {
|
||||
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
|
||||
@@ -66732,23 +66732,25 @@ var ts;
|
||||
checkGrammarJsxElement(node);
|
||||
}
|
||||
checkJsxPreconditions(node);
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
if (!getJsxNamespaceContainerForImplicitImport(node)) {
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym = void 0;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isNodeOpeningLikeElement) {
|
||||
|
||||
+22
-20
@@ -66317,10 +66317,10 @@ var ts;
|
||||
return links.jsxNamespace;
|
||||
}
|
||||
if (!links || links.jsxNamespace !== false) {
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
var resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
var resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
if (!resolvedNamespace || resolvedNamespace === unknownSymbol) {
|
||||
resolvedNamespace = getJsxNamespaceContainerForImplicitImport(location);
|
||||
var namespaceName = getJsxNamespace(location);
|
||||
resolvedNamespace = resolveName(location, namespaceName, 1920 /* Namespace */, /*diagnosticMessage*/ undefined, namespaceName, /*isUse*/ false);
|
||||
}
|
||||
if (resolvedNamespace) {
|
||||
var candidate = resolveSymbol(getSymbol(getExportsOfSymbol(resolveSymbol(resolvedNamespace)), JsxNames.JSX, 1920 /* Namespace */));
|
||||
@@ -66527,23 +66527,25 @@ var ts;
|
||||
checkGrammarJsxElement(node);
|
||||
}
|
||||
checkJsxPreconditions(node);
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
if (!getJsxNamespaceContainerForImplicitImport(node)) {
|
||||
// The reactNamespace/jsxFactory's root symbol should be marked as 'used' so we don't incorrectly elide its import.
|
||||
// And if there is no reactNamespace/jsxFactory's symbol in scope when targeting React emit, we should issue an error.
|
||||
var jsxFactoryRefErr = diagnostics && compilerOptions.jsx === 2 /* React */ ? ts.Diagnostics.Cannot_find_name_0 : undefined;
|
||||
var jsxFactoryNamespace = getJsxNamespace(node);
|
||||
var jsxFactoryLocation = isNodeOpeningLikeElement ? node.tagName : node;
|
||||
// allow null as jsxFragmentFactory
|
||||
var jsxFactorySym = void 0;
|
||||
if (!(ts.isJsxOpeningFragment(node) && jsxFactoryNamespace === "null")) {
|
||||
jsxFactorySym = resolveName(jsxFactoryLocation, jsxFactoryNamespace, 111551 /* Value */, jsxFactoryRefErr, jsxFactoryNamespace, /*isUse*/ true);
|
||||
}
|
||||
if (jsxFactorySym) {
|
||||
// Mark local symbol as referenced here because it might not have been marked
|
||||
// if jsx emit was not jsxFactory as there wont be error being emitted
|
||||
jsxFactorySym.isReferenced = 67108863 /* All */;
|
||||
// If react/jsxFactory symbol is alias, mark it as refereced
|
||||
if (jsxFactorySym.flags & 2097152 /* Alias */ && !getTypeOnlyAliasDeclaration(jsxFactorySym)) {
|
||||
markAliasSymbolAsReferenced(jsxFactorySym);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isNodeOpeningLikeElement) {
|
||||
|
||||
Reference in New Issue
Block a user