OpenPromise

This represents a Promise that has its resolve and reject functions bundled as methods attached to the promise object.

Properties

Promise

toStringTag]

Functions

create()

Methods

catch()

reject()

resolve()

then()


Properties

Communicator.Util.OpenPromise.Promise
Communicator.Util.OpenPromise.[Symbol.toStringTag]

Functions

create

Communicator.Util.OpenPromise.create()

Creates a new OpenPromise that does not have its state resolved or rejected.

Return type

Communicator.Util.OpenPromise

Methods

catch

Communicator.Util.OpenPromise.catch(onrejected)

Attaches a callback for only the rejection of the Promise.

Arguments
  • onrejected ({  }()) – The callback to execute when the Promise is rejected.

Return type

Promise[{  }]

Returns

A Promise for the completion of the callback.

reject

Communicator.Util.OpenPromise.reject(error)
Arguments
  • error (any()) –

Return type

void

resolve

Communicator.Util.OpenPromise.resolve(this, value)
Arguments
Return type

void

Communicator.Util.OpenPromise.resolve(this)
Arguments
Return type

void

then

Communicator.Util.OpenPromise.then(onfulfilled, onrejected)

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

Arguments
  • onfulfilled ({  }()) – The callback to execute when the Promise is resolved.

  • onrejected ({  }()) – The callback to execute when the Promise is rejected.

Return type

Promise[{  }]

Returns

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