MCPcopy Create free account
hub / github.com/nodejs/node / checkAwaitedType

Function checkAwaitedType

test/fixtures/snapshot/typescript.js:81320–81325  ·  view source on GitHub ↗

* Gets the "awaited type" of a type. * @param type The type to await. * @param withAlias When `true`, wraps the "awaited type" in `Awaited ` if needed. * @remarks The "awaited type" of an expression is its "promised type" if the expression is a * Promise-like ty

(type, withAlias, errorNode, diagnosticMessage, arg0)

Source from the content-addressed store, hash-verified

81318 * The runtime behavior of the `await` keyword.
81319 */
81320 function checkAwaitedType(type, withAlias, errorNode, diagnosticMessage, arg0) {
81321 var awaitedType = withAlias ?
81322 getAwaitedType(type, errorNode, diagnosticMessage, arg0) :
81323 getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, arg0);
81324 return awaitedType || errorType;
81325 }
81326 /**
81327 * Determines whether a type is an object with a callable `then` member.
81328 */

Calls 2

getAwaitedTypeFunction · 0.85
getAwaitedTypeNoAliasFunction · 0.85

Tested by

no test coverage detected