Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Operators

A module that provides static bindings for functions implemented by ExtendedPromise.

Index

Functions

For

  • Returns a StaticOperators module, which provides static bindings for functions implemented by a ExtendedPromiseConstructor. The StaticOperators instance provides functions that use the constructor ctor internally.

    constructor

    Type parameters

    Parameters

    Returns StaticOperators<P>

and

  • and<P, T>(promise: P, ...others: PromiseLike<T>[]): BasicPromise<any[]>
  • Static version of the and function.

    see

    ExtendedPromise.and

    Type parameters

    Parameters

    • promise: P
    • Rest ...others: PromiseLike<T>[]

    Returns BasicPromise<any[]>

    The return type of this function is meant to be P<T[]>, where P is the input promise type.

delay

  • delay<P, T>(promise: P, time: number | Date): P
  • Static version of the delay function.

    see

    ExtendedPromise.delay

    Type parameters

    Parameters

    • promise: P
    • time: number | Date

    Returns P

each

fallback

  • fallback<P, T>(promise: P, ...others: (T | PromiseLike<T> | function)[]): P
  • Static version of the fallback function.

    see

    ExtendedPromise.fallback

    Type parameters

    Parameters

    • promise: P
    • Rest ...others: (T | PromiseLike<T> | function)[]

    Returns P

invert

  • Static version of the invert function.

    see

    ExtendedPromise.invert

    Type parameters

    Parameters

    • promise: P

    Returns BasicPromise<any>

    The return type of this function is meant to be P<any>, where P is the promise type.

lastly

mustNot

  • mustNot<P, T>(promise: P, failReason: AsyncCallback<T, any>): P
  • Static version of the mustNot function.

    see

    [[ExtendedPromise.mustNot]]

    Type parameters

    Parameters

    Returns P

race

  • race<P, T>(promise: P, ...others: PromiseLike<T>[]): P
  • Static version of the race function.

    see

    ExtendedPromise.race

    Type parameters

    Parameters

    • promise: P
    • Rest ...others: PromiseLike<T>[]

    Returns P

stall

  • stall<P, T>(promise: P, time: number | Date): P
  • Static version of the stall function.

    see

    ExtendedPromise.stall

    Type parameters

    Parameters

    • promise: P
    • time: number | Date

    Returns P

test

  • Static version of the test function.

    see

    ExtendedPromise.test

    Type parameters

    Parameters

    • promise: P

    Returns BasicPromise<boolean>

    The return type is meant to be P<boolean>, where P is the promise type.

timeout

  • timeout<P, T>(promise: P, time: number | Date, onTimeout?: function): P
  • Static version of the timeout function.

    see

    ExtendedPromise.timeout

    Type parameters

    Parameters

    • promise: P
    • time: number | Date
    • Optional onTimeout: function
        • (): T | PromiseLike<T>
        • Returns T | PromiseLike<T>

    Returns P

Generated using TypeDoc