interface Promise
Private

Represents the completion of an asynchronous operation

Type Parameters

Methods

then<
TResult1 = T,
TResult2 = never,
>
(
onfulfilled?:
((value: T) => TResult1 | PromiseLike<TResult1>)
| undefined
| null
,
onrejected?:
((reason: any) => TResult2 | PromiseLike<TResult2>)
| undefined
| null
,
): Promise<TResult1 | TResult2>

Attaches callbacks for the resolution and/or rejection of the Promise.

catch<TResult = never>(onrejected?:
((reason: any) => TResult | PromiseLike<TResult>)
| undefined
| null
): Promise<T | TResult>

Attaches a callback for only the rejection of the Promise.