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

Function setExportContextFlag

test/fixtures/snapshot/typescript.js:46346–46355  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

46344 return !!body && body.statements.some(function (s) { return ts.isExportDeclaration(s) || ts.isExportAssignment(s); });
46345 }
46346 function setExportContextFlag(node) {
46347 // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular
46348 // declarations with export modifiers) is an export context in which declarations are implicitly exported.
46349 if (node.flags & 16777216 /* NodeFlags.Ambient */ && !hasExportDeclarations(node)) {
46350 node.flags |= 64 /* NodeFlags.ExportContext */;
46351 }
46352 else {
46353 node.flags &= ~64 /* NodeFlags.ExportContext */;
46354 }
46355 }
46356 function bindModuleDeclaration(node) {
46357 setExportContextFlag(node);
46358 if (ts.isAmbientModule(node)) {

Callers 2

bindModuleDeclarationFunction · 0.85

Calls 1

hasExportDeclarationsFunction · 0.85

Tested by

no test coverage detected