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

Function getContextualTypeForYieldOperand

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

Source from the content-addressed store, hash-verified

72522 return undefined;
72523 }
72524 function getContextualTypeForYieldOperand(node) {
72525 var func = ts.getContainingFunction(node);
72526 if (func) {
72527 var functionFlags = ts.getFunctionFlags(func);
72528 var contextualReturnType = getContextualReturnType(func);
72529 if (contextualReturnType) {
72530 return node.asteriskToken
72531 ? contextualReturnType
72532 : getIterationTypeOfGeneratorFunctionReturnType(0 /* IterationTypeKind.Yield */, contextualReturnType, (functionFlags & 2 /* FunctionFlags.Async */) !== 0);
72533 }
72534 }
72535 return undefined;
72536 }
72537 function isInParameterInitializerBeforeContainingFunction(node) {
72538 var inBindingInitializer = false;
72539 while (node.parent && !ts.isFunctionLike(node.parent)) {

Callers 1

getContextualTypeFunction · 0.85

Tested by

no test coverage detected