MCPcopy Index your code
hub / github.com/nodejs/node / getJsxNamespaceSymbol

Function getJsxNamespaceSymbol

test/fixtures/snapshot/typescript.js:162455–162467  ·  view source on GitHub ↗
(containsJsx)

Source from the content-addressed store, hash-verified

162453 }
162454 return { movedSymbols: movedSymbols, newFileImportsFromOldFile: newFileImportsFromOldFile, oldFileImportsFromNewFile: oldFileImportsFromNewFile, oldImportsNeededByNewFile: oldImportsNeededByNewFile, unusedImportsFromOldFile: unusedImportsFromOldFile };
162455 function getJsxNamespaceSymbol(containsJsx) {
162456 if (containsJsx === undefined) {
162457 return undefined;
162458 }
162459 var jsxNamespace = checker.getJsxNamespace(containsJsx);
162460 // Strictly speaking, this could resolve to a symbol other than the JSX namespace.
162461 // This will produce erroneous output (probably, an incorrectly copied import) but
162462 // is expected to be very rare and easily reversible.
162463 var jsxNamespaceSymbol = checker.resolveName(jsxNamespace, containsJsx, 1920 /* SymbolFlags.Namespace */, /*excludeGlobals*/ true);
162464 return !!jsxNamespaceSymbol && ts.some(jsxNamespaceSymbol.declarations, isInImport)
162465 ? jsxNamespaceSymbol
162466 : undefined;
162467 }
162468 }
162469 // Below should all be utilities
162470 function isInImport(decl) {

Callers 1

getUsageInfoFunction · 0.85

Calls 1

someMethod · 0.80

Tested by

no test coverage detected