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

Function symbolMatchesSignature

test/fixtures/snapshot/typescript.js:139788–139793  ·  view source on GitHub ↗

* True if we should not add definitions for both the signature symbol and the definition symbol. * True for `const |f = |() => 0`, false for `function |f() {} const |g = f;`. * Also true for any assignment RHS.

(s, calledDeclaration)

Source from the content-addressed store, hash-verified

139786 * Also true for any assignment RHS.
139787 */
139788 function symbolMatchesSignature(s, calledDeclaration) {
139789 return s === calledDeclaration.symbol
139790 || s === calledDeclaration.symbol.parent
139791 || ts.isAssignmentExpression(calledDeclaration.parent)
139792 || (!ts.isCallLikeExpression(calledDeclaration.parent) && s === calledDeclaration.parent.symbol);
139793 }
139794 // If the current location we want to find its definition is in an object literal, try to get the contextual type for the
139795 // object literal, lookup the property symbol in the contextual type, and use this for goto-definition.
139796 // For example

Callers 1

getDefinitionAtPositionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected