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

Function isAwaitedTypeInstantiation

test/fixtures/snapshot/typescript.js:81337–81344  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

81335 return !!thenFunction && getSignaturesOfType(getTypeWithFacts(thenFunction, 2097152 /* TypeFacts.NEUndefinedOrNull */), 0 /* SignatureKind.Call */).length > 0;
81336 }
81337 function isAwaitedTypeInstantiation(type) {
81338 var _a;
81339 if (type.flags & 16777216 /* TypeFlags.Conditional */) {
81340 var awaitedSymbol = getGlobalAwaitedSymbol(/*reportErrors*/ false);
81341 return !!awaitedSymbol && type.aliasSymbol === awaitedSymbol && ((_a = type.aliasTypeArguments) === null || _a === void 0 ? void 0 : _a.length) === 1;
81342 }
81343 return false;
81344 }
81345 /**
81346 * For a generic `Awaited<T>`, gets `T`.
81347 */

Callers 3

unwrapAwaitedTypeFunction · 0.85
getAwaitedTypeNoAliasFunction · 0.85

Calls 1

getGlobalAwaitedSymbolFunction · 0.85

Tested by

no test coverage detected