RejectablePromise

types.RejectablePromise

Type parameters

Name
T

Hierarchy

rejectCallback

rejectCallback: (reason?: any) => void

Type declaration

(reason?): void

Parameters
Name Type
reason? any
Returns

void

Defined in

src/types/async.d.ts#23


[toStringTag]

Readonly [toStringTag]: string

Inherited from

Promise.[toStringTag]

Defined in

typescript/lib/lib.es2015.symbol.wellknown.d.ts:176

finally

finally(onfinally?): Promise<T>

Parameters

Name Type
onfinally? null | () => void

Returns

Promise<T>

Overrides

Promise.finally

Defined in

src/types/async.d.ts#24


then

then<TResult1, TResult2>(onfulfilled?, onrejected?): Promise<TResult1 | TResult2>

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

Type parameters

Name Type
TResult1 T
TResult2 never

Parameters

Name Type Description
onfulfilled? null | (value: T) => TResult1 | PromiseLike<TResult1> The callback to execute when the Promise is resolved.
onrejected? null | (reason: any) => TResult2 | PromiseLike<TResult2> The callback to execute when the Promise is rejected.

Returns

Promise<TResult1 | TResult2>

A Promise for the completion of which ever callback is executed.

Inherited from

Promise.then

Defined in

typescript/lib/lib.es5.d.ts:1550


catch

catch<TResult>(onrejected?): Promise<T | TResult>

Attaches a callback for only the rejection of the Promise.

Type parameters

Name Type
TResult never

Parameters

Name Type Description
onrejected? null | (reason: any) => TResult | PromiseLike<TResult> The callback to execute when the Promise is rejected.

Returns

Promise<T | TResult>

A Promise for the completion of the callback.

Inherited from

Promise.catch

Defined in

typescript/lib/lib.es5.d.ts:1557