MCPcopy Create free account
hub / github.com/nodejs/node / getSymbolName

Function getSymbolName

test/fixtures/snapshot/typescript.js:153591–153600  ·  view source on GitHub ↗
(sourceFile, checker, symbolToken, compilerOptions)

Source from the content-addressed store, hash-verified

153589 return { kind: 4 /* ImportFixKind.PromoteTypeOnly */, typeOnlyAliasDeclaration: typeOnlyAliasDeclaration };
153590 }
153591 function getSymbolName(sourceFile, checker, symbolToken, compilerOptions) {
153592 var parent = symbolToken.parent;
153593 if ((ts.isJsxOpeningLikeElement(parent) || ts.isJsxClosingElement(parent)) && parent.tagName === symbolToken && ts.jsxModeNeedsExplicitImport(compilerOptions.jsx)) {
153594 var jsxNamespace = checker.getJsxNamespace(sourceFile);
153595 if (needsJsxNamespaceFix(jsxNamespace, symbolToken, checker)) {
153596 return jsxNamespace;
153597 }
153598 }
153599 return symbolToken.text;
153600 }
153601 function needsJsxNamespaceFix(jsxNamespace, symbolToken, checker) {
153602 if (ts.isIntrinsicJsxName(symbolToken.text))
153603 return true; // If we were triggered by a matching error code on an intrinsic, the error must have been about missing the JSX factory

Callers 3

getFixesInfoFunction · 0.85

Calls 1

needsJsxNamespaceFixFunction · 0.85

Tested by

no test coverage detected