Options
All
  • Public
  • Public/Protected
  • All
Menu

Module PromiseStuff

Index

Functions

deriveNew

  • Accepts a Promise/A+ constructor and uses it to create a derived promise based on that implementation, with all the additional members. Use this function to wrap an existing Promise implementation without modifying it. Note that promise implementations that define methods beyond the Promise/A+ interface may return instances of the base promise, instead of the derived one.

    Parameters

    • constructor: PromiseConstructorLike

      The promise constructor used to create the derived promise.

    Returns ExtendedPromiseConstructor

extendExisting

  • extendExisting(s: PromiseConstructorLike): void
  • Accepts an existing Promise/A+ constructor and extends the constructor itself and its prototype with all the available methods. Calling this method on a Promise mutates it.

    Parameters

    • s: PromiseConstructorLike

    Returns void

Generated using TypeDoc