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

Function getTypePredicateParent

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

Source from the content-addressed store, hash-verified

80140 }
80141 }
80142 function getTypePredicateParent(node) {
80143 switch (node.parent.kind) {
80144 case 214 /* SyntaxKind.ArrowFunction */:
80145 case 174 /* SyntaxKind.CallSignature */:
80146 case 256 /* SyntaxKind.FunctionDeclaration */:
80147 case 213 /* SyntaxKind.FunctionExpression */:
80148 case 179 /* SyntaxKind.FunctionType */:
80149 case 169 /* SyntaxKind.MethodDeclaration */:
80150 case 168 /* SyntaxKind.MethodSignature */:
80151 var parent = node.parent;
80152 if (node === parent.type) {
80153 return parent;
80154 }
80155 }
80156 }
80157 function checkIfTypePredicateVariableIsDeclaredInBindingPattern(pattern, predicateVariableNode, predicateVariableName) {
80158 for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) {
80159 var element = _a[_i];

Callers 1

checkTypePredicateFunction · 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…