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

Function getIterationTypeOfIterable

test/fixtures/snapshot/typescript.js:83087–83093  ·  view source on GitHub ↗

* Gets the requested "iteration type" from an `Iterable`-like or `AsyncIterable`-like type.

(use, typeKind, inputType, errorNode)

Source from the content-addressed store, hash-verified

83085 * Gets the requested "iteration type" from an `Iterable`-like or `AsyncIterable`-like type.
83086 */
83087 function getIterationTypeOfIterable(use, typeKind, inputType, errorNode) {
83088 if (isTypeAny(inputType)) {
83089 return undefined;
83090 }
83091 var iterationTypes = getIterationTypesOfIterable(inputType, use, errorNode);
83092 return iterationTypes && iterationTypes[getIterationTypesKeyFromIterationTypeKind(typeKind)];
83093 }
83094 function createIterationTypes(yieldType, returnType, nextType) {
83095 // `yieldType` and `returnType` are defaulted to `neverType` they each will be combined
83096 // via `getUnionType` when merging iteration types. `nextType` is defined as `unknownType`

Callers 2

checkYieldExpressionFunction · 0.85

Calls 3

isTypeAnyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…