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

Function getImpliedConstraint

test/fixtures/snapshot/typescript.js:60472–60476  ·  view source on GitHub ↗
(type, checkNode, extendsNode)

Source from the content-addressed store, hash-verified

60470 return node.kind === 184 /* SyntaxKind.TupleType */ && node.elements.length === 1;
60471 }
60472 function getImpliedConstraint(type, checkNode, extendsNode) {
60473 return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) :
60474 getActualTypeVariable(getTypeFromTypeNode(checkNode)) === getActualTypeVariable(type) ? getTypeFromTypeNode(extendsNode) :
60475 undefined;
60476 }
60477 function getConditionalFlowTypeOfType(type, node) {
60478 var constraints;
60479 var covariant = true;

Callers 1

Calls 3

isUnaryTupleTypeNodeFunction · 0.85
getActualTypeVariableFunction · 0.85
getTypeFromTypeNodeFunction · 0.85

Tested by

no test coverage detected