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

Function getIterationTypesOfIterator

test/fixtures/snapshot/typescript.js:83374–83382  ·  view source on GitHub ↗

* Gets the *yield*, *return*, and *next* types from an `Iterator`-like or `AsyncIterator`-like type. * * If we successfully found the *yield*, *return*, and *next* types, an `IterationTypes` * record is returned. Otherwise, `undefined` is returned.

(type, resolver, errorNode)

Source from the content-addressed store, hash-verified

83372 * record is returned. Otherwise, `undefined` is returned.
83373 */
83374 function getIterationTypesOfIterator(type, resolver, errorNode) {
83375 if (isTypeAny(type)) {
83376 return anyIterationTypes;
83377 }
83378 var iterationTypes = getIterationTypesOfIteratorCached(type, resolver) ||
83379 getIterationTypesOfIteratorFast(type, resolver) ||
83380 getIterationTypesOfIteratorSlow(type, resolver, errorNode);
83381 return iterationTypes === noIterationTypes ? undefined : iterationTypes;
83382 }
83383 /**
83384 * Gets the iteration types of an `Iterator`-like or `AsyncIterator`-like type from the
83385 * cache.

Calls 4

isTypeAnyFunction · 0.85

Tested by

no test coverage detected