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

Function checkConditionalExpression

test/fixtures/snapshot/typescript.js:79447–79453  ·  view source on GitHub ↗
(node, checkMode)

Source from the content-addressed store, hash-verified

79445 }
79446 }
79447 function checkConditionalExpression(node, checkMode) {
79448 checkTruthinessExpression(node.condition);
79449 checkTestingKnownTruthyCallableOrAwaitableType(node.condition, node.whenTrue);
79450 var type1 = checkExpression(node.whenTrue, checkMode);
79451 var type2 = checkExpression(node.whenFalse, checkMode);
79452 return getUnionType([type1, type2], 2 /* UnionReduction.Subtype */);
79453 }
79454 function isTemplateLiteralContext(node) {
79455 var parent = node.parent;
79456 return ts.isParenthesizedExpression(parent) && isTemplateLiteralContext(parent) ||

Callers 1

checkExpressionWorkerFunction · 0.85

Calls 4

getUnionTypeFunction · 0.85
checkExpressionFunction · 0.70

Tested by

no test coverage detected