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

Function namespaceElementVisitorWorker

test/fixtures/snapshot/typescript.js:91779–91792  ·  view source on GitHub ↗

* Specialized visitor that visits the immediate children of a namespace. * * @param node The node to visit.

(node)

Source from the content-addressed store, hash-verified

91777 * @param node The node to visit.
91778 */
91779 function namespaceElementVisitorWorker(node) {
91780 if (node.kind === 272 /* SyntaxKind.ExportDeclaration */ ||
91781 node.kind === 266 /* SyntaxKind.ImportDeclaration */ ||
91782 node.kind === 267 /* SyntaxKind.ImportClause */ ||
91783 (node.kind === 265 /* SyntaxKind.ImportEqualsDeclaration */ &&
91784 node.moduleReference.kind === 277 /* SyntaxKind.ExternalModuleReference */)) {
91785 // do not emit ES6 imports and exports since they are illegal inside a namespace
91786 return undefined;
91787 }
91788 else if (node.transformFlags & 1 /* TransformFlags.ContainsTypeScript */ || ts.hasSyntacticModifier(node, 1 /* ModifierFlags.Export */)) {
91789 return visitTypeScript(node);
91790 }
91791 return node;
91792 }
91793 /**
91794 * Specialized visitor that visits the immediate children of a class with TypeScript syntax.
91795 *

Callers

nothing calls this directly

Calls 1

visitTypeScriptFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…