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

Function getTypePredicateArgument

test/fixtures/snapshot/typescript.js:70152–70158  ·  view source on GitHub ↗
(predicate, callExpression)

Source from the content-addressed store, hash-verified

70150 signature.declaration && (getReturnTypeFromAnnotation(signature.declaration) || unknownType).flags & 131072 /* TypeFlags.Never */);
70151 }
70152 function getTypePredicateArgument(predicate, callExpression) {
70153 if (predicate.kind === 1 /* TypePredicateKind.Identifier */ || predicate.kind === 3 /* TypePredicateKind.AssertsIdentifier */) {
70154 return callExpression.arguments[predicate.parameterIndex];
70155 }
70156 var invokedExpression = ts.skipParentheses(callExpression.expression);
70157 return ts.isAccessExpression(invokedExpression) ? ts.skipParentheses(invokedExpression.expression) : undefined;
70158 }
70159 function reportFlowControlError(node) {
70160 var block = ts.findAncestor(node, ts.isFunctionOrModuleBlock);
70161 var sourceFile = ts.getSourceFileOfNode(node);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…