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

Function serializeAsFunctionNamespaceMerge

test/fixtures/snapshot/typescript.js:54654–54667  ·  view source on GitHub ↗
(type, symbol, localName, modifierFlags)

Source from the content-addressed store, hash-verified

54652 })), modifierFlags);
54653 }
54654 function serializeAsFunctionNamespaceMerge(type, symbol, localName, modifierFlags) {
54655 var signatures = getSignaturesOfType(type, 0 /* SignatureKind.Call */);
54656 for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) {
54657 var sig = signatures_2[_i];
54658 // Each overload becomes a separate function declaration, in order
54659 var decl = signatureToSignatureDeclarationHelper(sig, 256 /* SyntaxKind.FunctionDeclaration */, context, { name: ts.factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled });
54660 addResult(ts.setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags);
54661 }
54662 // Module symbol emit will take care of module-y members, provided it has exports
54663 if (!(symbol.flags & (512 /* SymbolFlags.ValueModule */ | 1024 /* SymbolFlags.NamespaceModule */) && !!symbol.exports && !!symbol.exports.size)) {
54664 var props = ts.filter(getPropertiesOfType(type), isNamespaceMember);
54665 serializeAsNamespaceDeclaration(props, localName, modifierFlags, /*suppressNewPrivateContext*/ true);
54666 }
54667 }
54668 function getSignatureTextRangeLocation(signature) {
54669 if (signature.declaration && signature.declaration.parent) {
54670 if (ts.isBinaryExpression(signature.declaration.parent) && ts.getAssignmentDeclarationKind(signature.declaration.parent) === 5 /* AssignmentDeclarationKind.Property */) {

Callers 2

serializeSymbolWorkerFunction · 0.85

Calls 7

getSignaturesOfTypeFunction · 0.85
addResultFunction · 0.85
getPropertiesOfTypeFunction · 0.85
filterMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…