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

Function getAsyncFromSyncIterationTypes

test/fixtures/snapshot/typescript.js:83210–83221  ·  view source on GitHub ↗
(iterationTypes, errorNode)

Source from the content-addressed store, hash-verified

83208 return iterationTypes === noIterationTypes ? undefined : iterationTypes;
83209 }
83210 function getAsyncFromSyncIterationTypes(iterationTypes, errorNode) {
83211 if (iterationTypes === noIterationTypes)
83212 return noIterationTypes;
83213 if (iterationTypes === anyIterationTypes)
83214 return anyIterationTypes;
83215 var yieldType = iterationTypes.yieldType, returnType = iterationTypes.returnType, nextType = iterationTypes.nextType;
83216 // if we're requesting diagnostics, report errors for a missing `Awaited<T>`.
83217 if (errorNode) {
83218 getGlobalAwaitedSymbol(/*reportErrors*/ true);
83219 }
83220 return createIterationTypes(getAwaitedType(yieldType, errorNode) || anyType, getAwaitedType(returnType, errorNode) || anyType, nextType);
83221 }
83222 /**
83223 * Gets the *yield*, *return*, and *next* types from a non-union type.
83224 *

Callers 1

Calls 3

getGlobalAwaitedSymbolFunction · 0.85
createIterationTypesFunction · 0.85
getAwaitedTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…