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

Function checkExpressionCached

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

Source from the content-addressed store, hash-verified

79509 }
79510 }
79511 function checkExpressionCached(node, checkMode) {
79512 if (checkMode && checkMode !== 0 /* CheckMode.Normal */) {
79513 return checkExpression(node, checkMode);
79514 }
79515 var links = getNodeLinks(node);
79516 if (!links.resolvedType) {
79517 // When computing a type that we're going to cache, we need to ignore any ongoing control flow
79518 // analysis because variables may have transient types in indeterminable states. Moving flowLoopStart
79519 // to the top of the stack ensures all transient types are computed from a known point.
79520 var saveFlowLoopStart = flowLoopStart;
79521 var saveFlowTypeCache = flowTypeCache;
79522 flowLoopStart = flowLoopCount;
79523 flowTypeCache = undefined;
79524 links.resolvedType = checkExpression(node, checkMode);
79525 flowTypeCache = saveFlowTypeCache;
79526 flowLoopStart = saveFlowLoopStart;
79527 }
79528 return links.resolvedType;
79529 }
79530 function isTypeAssertion(node) {
79531 node = ts.skipParentheses(node, /*excludeJSDocTypeAssertions*/ true);
79532 return node.kind === 211 /* SyntaxKind.TypeAssertionExpression */ ||

Calls 2

getNodeLinksFunction · 0.85
checkExpressionFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…