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

Function bindExportAssignment

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

Source from the content-addressed store, hash-verified

47076 bindAnonymousDeclaration(file, 512 /* SymbolFlags.ValueModule */, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
47077 }
47078 function bindExportAssignment(node) {
47079 if (!container.symbol || !container.symbol.exports) {
47080 // Incorrect export assignment in some sort of block construct
47081 bindAnonymousDeclaration(node, 111551 /* SymbolFlags.Value */, getDeclarationName(node));
47082 }
47083 else {
47084 var flags = ts.exportAssignmentIsAlias(node)
47085 // An export default clause with an EntityNameExpression or a class expression exports all meanings of that identifier or expression;
47086 ? 2097152 /* SymbolFlags.Alias */
47087 // An export default clause with any other expression exports a value
47088 : 4 /* SymbolFlags.Property */;
47089 // If there is an `export default x;` alias declaration, can't `export default` anything else.
47090 // (In contrast, you can still have `export default function f() {}` and `export default interface I {}`.)
47091 var symbol = declareSymbol(container.symbol.exports, container.symbol, node, flags, 67108863 /* SymbolFlags.All */);
47092 if (node.isExportEquals) {
47093 // Will be an error later, since the module already has other exports. Just make sure this has a valueDeclaration set.
47094 ts.setValueDeclaration(symbol, node);
47095 }
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));

Callers 1

bindWorkerFunction · 0.85

Calls 3

bindAnonymousDeclarationFunction · 0.85
getDeclarationNameFunction · 0.85
declareSymbolFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…