Skip to content

editorGlobalsExternalControlPromise

Class: ExternalControlPromise ‹T

A special kind of promise, which also exposes methods for resolving / rejecting it from the outside

Type parameters

T

Hierarchy

ExternalControlPromise

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new ExternalControlPromise(): ExternalControlPromise

Defined in src/util/ExternalControlPromise.ts:14

Returns: ExternalControlPromise

Properties

Readonly [Symbol.toStringTag]

[Symbol.toStringTag]: string

Inherited from ExternalControlPromise.[Symbol.toStringTag]

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


Private Readonly rejectHandler

rejectHandler: function

Defined in src/util/ExternalControlPromise.ts:14

Type declaration:

▸ (reason?: any): void

Parameters:

Name Type
reason? any

Private Readonly resolveHandler

resolveHandler: function

Defined in src/util/ExternalControlPromise.ts:13

Type declaration:

▸ (value?: T | PromiseLike‹T›): void

Parameters:

Name Type
value? T | PromiseLike‹T›

Static Promise

Promise: PromiseConstructor

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

Accessors

Static [Symbol.species]

get [Symbol.species](): typeof Promise

Defined in src/util/ExternalControlPromise.ts:9

Tell all the promise handling functions that instances of this class should be handled as a promise object.

see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/species

Returns: typeof Promise

Methods

catch

catchTResult›(onrejected?: function | undefined | null): Promise‹T | TResult›

Inherited from ExternalControlPromise.catch

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 ExternalControlPromise.finally

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.


rejectExternally

rejectExternally(reason?: any): void

Defined in src/util/ExternalControlPromise.ts:31

Parameters:

Name Type
reason? any

Returns: void


resolveExternally

resolveExternally(value: T | PromiseLike‹T›): void

Defined in src/util/ExternalControlPromise.ts:27

Parameters:

Name Type
value T | PromiseLike‹T›

Returns: void


then

thenTResult1, TResult2›(onfulfilled?: function | undefined | null, onrejected?: function | undefined | null): Promise‹TResult1 | TResult2›

Inherited from ExternalControlPromise.then

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.