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

Function getLocalJsxNamespace

test/fixtures/snapshot/typescript.js:48969–48982  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

48967 return _jsxNamespace;
48968 }
48969 function getLocalJsxNamespace(file) {
48970 if (file.localJsxNamespace) {
48971 return file.localJsxNamespace;
48972 }
48973 var jsxPragma = file.pragmas.get("jsx");
48974 if (jsxPragma) {
48975 var chosenPragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
48976 file.localJsxFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
48977 ts.visitNode(file.localJsxFactory, markAsSynthetic);
48978 if (file.localJsxFactory) {
48979 return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText;
48980 }
48981 }
48982 }
48983 function markAsSynthetic(node) {
48984 ts.setTextRangePosEnd(node, -1, -1);
48985 return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext);

Callers 2

getJsxNamespaceFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…