utils

@cahil/utilsGlobalsasyncCancelableWrappedPromise

Interface: CancelableWrappedPromise <T>

A promise that can have it’s resolution cancelled

Type parameters

T

Hierarchy

Index

Properties

Methods

Properties

Promise

Promise: PromiseConstructor

Defined in node_modules/typescript/lib/lib.es2015.promise.d.ts:152


__@toStringTag

__@toStringTag: string

Inherited from void

Defined in node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:169

Methods

cancel

cancel(): void

Defined in src/async/makeCancelable.ts:10

Returns: void


catch

catch<TResult>(onrejected?: function undefined null): *Promise‹T TResult›*

Inherited from void

Defined in node_modules/typescript/lib/lib.es5.d.ts:1430

Attaches a callback for only the rejection of the Promise.

Type parameters:

TResult

Parameters:

Name Type Description
onrejected? function | undefined | null The callback to execute when the Promise is rejected.
Returns: *Promise‹T TResult›*

A Promise for the completion of the callback.


finally

finally(onfinally?: function undefined null): Promise‹T›

Inherited from void

Defined in node_modules/typescript/lib/lib.es2018.promise.d.ts:31

Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

Parameters:

Name Type Description
onfinally? function | undefined | null The callback to execute when the Promise is settled (fulfilled or rejected).

Returns: Promise‹T›

A Promise for the completion of the callback.


then

then<TResult1, TResult2>(onfulfilled?: function undefined null, onrejected?: function undefined null): *Promise‹TResult1 TResult2›*

Inherited from void

Defined in node_modules/typescript/lib/lib.es5.d.ts:1423

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

Type parameters:

TResult1

TResult2

Parameters:

Name Type Description
onfulfilled? function | undefined | null The callback to execute when the Promise is resolved.
onrejected? function | undefined | null The callback to execute when the Promise is rejected.
Returns: *Promise‹TResult1 TResult2›*

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