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

Function getAssignedJSPrototype

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

Source from the content-addressed store, hash-verified

77044 return getSymbolOfNode(decl);
77045 }
77046 function getAssignedJSPrototype(node) {
77047 if (!node.parent) {
77048 return false;
77049 }
77050 var parent = node.parent;
77051 while (parent && parent.kind === 206 /* SyntaxKind.PropertyAccessExpression */) {
77052 parent = parent.parent;
77053 }
77054 if (parent && ts.isBinaryExpression(parent) && ts.isPrototypeAccess(parent.left) && parent.operatorToken.kind === 63 /* SyntaxKind.EqualsToken */) {
77055 var right = ts.getInitializerOfBinaryExpression(parent);
77056 return ts.isObjectLiteralExpression(right) && right;
77057 }
77058 }
77059 /**
77060 * Syntactically and semantically checks a call or new expression.
77061 * @param node The call/new expression to be checked.

Callers 1

getAssignedClassSymbolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…