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

Function reportTypeNotIterableError

test/fixtures/snapshot/typescript.js:83362–83367  ·  view source on GitHub ↗
(errorNode, type, allowAsyncIterables)

Source from the content-addressed store, hash-verified

83360 return setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes);
83361 }
83362 function reportTypeNotIterableError(errorNode, type, allowAsyncIterables) {
83363 var message = allowAsyncIterables
83364 ? ts.Diagnostics.Type_0_must_have_a_Symbol_asyncIterator_method_that_returns_an_async_iterator
83365 : ts.Diagnostics.Type_0_must_have_a_Symbol_iterator_method_that_returns_an_iterator;
83366 errorAndMaybeSuggestAwait(errorNode, !!getAwaitedTypeOfPromise(type), message, typeToString(type));
83367 }
83368 /**
83369 * Gets the *yield*, *return*, and *next* types from an `Iterator`-like or `AsyncIterator`-like type.
83370 *

Callers 2

Calls 3

getAwaitedTypeOfPromiseFunction · 0.85
typeToStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…