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

Function getContextualIterationType

test/fixtures/snapshot/typescript.js:72550–72558  ·  view source on GitHub ↗
(kind, functionDecl)

Source from the content-addressed store, hash-verified

72548 return false;
72549 }
72550 function getContextualIterationType(kind, functionDecl) {
72551 var isAsync = !!(ts.getFunctionFlags(functionDecl) & 2 /* FunctionFlags.Async */);
72552 var contextualReturnType = getContextualReturnType(functionDecl);
72553 if (contextualReturnType) {
72554 return getIterationTypeOfGeneratorFunctionReturnType(kind, contextualReturnType, isAsync)
72555 || undefined;
72556 }
72557 return undefined;
72558 }
72559 function getContextualReturnType(functionDecl) {
72560 // If the containing function has a return type annotation, is a constructor, or is a get accessor whose
72561 // corresponding set accessor has a type annotation, return statements in the function are contextually typed

Callers 2

getReturnTypeFromBodyFunction · 0.85
checkYieldExpressionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…