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

Function getReferenceRoot

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

Source from the content-addressed store, hash-verified

69812 return node;
69813 }
69814 function getReferenceRoot(node) {
69815 var parent = node.parent;
69816 return parent.kind === 212 /* SyntaxKind.ParenthesizedExpression */ ||
69817 parent.kind === 221 /* SyntaxKind.BinaryExpression */ && parent.operatorToken.kind === 63 /* SyntaxKind.EqualsToken */ && parent.left === node ||
69818 parent.kind === 221 /* SyntaxKind.BinaryExpression */ && parent.operatorToken.kind === 27 /* SyntaxKind.CommaToken */ && parent.right === node ?
69819 getReferenceRoot(parent) : node;
69820 }
69821 function getTypeOfSwitchClause(clause) {
69822 if (clause.kind === 289 /* SyntaxKind.CaseClause */) {
69823 return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression));

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected