(promisedType)
| 77770 | } |
| 77771 | } |
| 77772 | function createPromiseType(promisedType) { |
| 77773 | // creates a `Promise<T>` type where `T` is the promisedType argument |
| 77774 | var globalPromiseType = getGlobalPromiseType(/*reportErrors*/ true); |
| 77775 | if (globalPromiseType !== emptyGenericType) { |
| 77776 | // if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type |
| 77777 | // Unwrap an `Awaited<T>` to `T` to improve inference. |
| 77778 | promisedType = getAwaitedTypeNoAlias(unwrapAwaitedType(promisedType)) || unknownType; |
| 77779 | return createTypeReference(globalPromiseType, [promisedType]); |
| 77780 | } |
| 77781 | return unknownType; |
| 77782 | } |
| 77783 | function createPromiseLikeType(promisedType) { |
| 77784 | // creates a `PromiseLike<T>` type where `T` is the promisedType argument |
| 77785 | var globalPromiseLikeType = getGlobalPromiseLikeType(/*reportErrors*/ true); |
no test coverage detected
searching dependent graphs…