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

Function getSignaturesOfSymbol

test/fixtures/snapshot/typescript.js:59783–59803  ·  view source on GitHub ↗
(symbol)

Source from the content-addressed store, hash-verified

59781 }
59782 }
59783 function getSignaturesOfSymbol(symbol) {
59784 if (!symbol || !symbol.declarations)
59785 return ts.emptyArray;
59786 var result = [];
59787 for (var i = 0; i < symbol.declarations.length; i++) {
59788 var decl = symbol.declarations[i];
59789 if (!ts.isFunctionLike(decl))
59790 continue;
59791 // Don't include signature if node is the implementation of an overloaded function. A node is considered
59792 // an implementation node if it has a body and the previous node is of the same kind and immediately
59793 // precedes the implementation node (i.e. has the same parent and ends where the implementation starts).
59794 if (i > 0 && decl.body) {
59795 var previous = symbol.declarations[i - 1];
59796 if (decl.parent === previous.parent && decl.kind === previous.kind && decl.pos === previous.end) {
59797 continue;
59798 }
59799 }
59800 result.push(getSignatureFromDeclaration(decl));
59801 }
59802 return result;
59803 }
59804 function resolveExternalModuleTypeByLiteral(name) {
59805 var moduleSym = resolveExternalModuleName(name, name);
59806 if (moduleSym) {

Calls 2

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…