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

Function bindNamespaceExportDeclaration

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

Source from the content-addressed store, hash-verified

47096 }
47097 }
47098 function bindNamespaceExportDeclaration(node) {
47099 if (node.modifiers && node.modifiers.length) {
47100 file.bindDiagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Modifiers_cannot_appear_here));
47101 }
47102 var diag = !ts.isSourceFile(node.parent) ? ts.Diagnostics.Global_module_exports_may_only_appear_at_top_level
47103 : !ts.isExternalModule(node.parent) ? ts.Diagnostics.Global_module_exports_may_only_appear_in_module_files
47104 : !node.parent.isDeclarationFile ? ts.Diagnostics.Global_module_exports_may_only_appear_in_declaration_files
47105 : undefined;
47106 if (diag) {
47107 file.bindDiagnostics.push(createDiagnosticForNode(node, diag));
47108 }
47109 else {
47110 file.symbol.globalExports = file.symbol.globalExports || ts.createSymbolTable();
47111 declareSymbol(file.symbol.globalExports, file.symbol, node, 2097152 /* SymbolFlags.Alias */, 2097152 /* SymbolFlags.AliasExcludes */);
47112 }
47113 }
47114 function bindExportDeclaration(node) {
47115 if (!container.symbol || !container.symbol.exports) {
47116 // Export * in some sort of block construct

Callers 1

bindWorkerFunction · 0.85

Calls 3

createDiagnosticForNodeFunction · 0.85
declareSymbolFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected