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

Function getReferenceCandidate

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

Source from the content-addressed store, hash-verified

69795 isEmptyArrayLiteral(node.parent.right);
69796 }
69797 function getReferenceCandidate(node) {
69798 switch (node.kind) {
69799 case 212 /* SyntaxKind.ParenthesizedExpression */:
69800 return getReferenceCandidate(node.expression);
69801 case 221 /* SyntaxKind.BinaryExpression */:
69802 switch (node.operatorToken.kind) {
69803 case 63 /* SyntaxKind.EqualsToken */:
69804 case 75 /* SyntaxKind.BarBarEqualsToken */:
69805 case 76 /* SyntaxKind.AmpersandAmpersandEqualsToken */:
69806 case 77 /* SyntaxKind.QuestionQuestionEqualsToken */:
69807 return getReferenceCandidate(node.left);
69808 case 27 /* SyntaxKind.CommaToken */:
69809 return getReferenceCandidate(node.right);
69810 }
69811 }
69812 return node;
69813 }
69814 function getReferenceRoot(node) {
69815 var parent = node.parent;
69816 return parent.kind === 212 /* SyntaxKind.ParenthesizedExpression */ ||

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…