Options
All
  • Public
  • Public/Protected
  • All
Menu

PromiseWrap provides promise-like functions that auto-invoke an exec method when called.

Type parameters

  • T

Hierarchy

Implements

  • PromiseLike<T>

Index

Methods

catch

  • catch<R>(onRejected: (err: any) => R | Promise<R>): Promise<T | R>
  • catch implements Promiselike.catch()

    Type parameters

    • R

    Parameters

    • onRejected: (err: any) => R | Promise<R>
        • (err: any): R | Promise<R>
        • Parameters

          • err: any

          Returns R | Promise<R>

    Returns Promise<T | R>

Protected Abstract createPromise

  • createPromise(): Promise<T>
  • createPromise should ben override to run the promised action.

    Returns Promise<T>

then

  • then<R, V>(onFulfilled: (value: T) => R | Promise<R>, onRejected?: undefined | ((err: any) => V | Promise<V>)): Promise<R | V>
  • then implements Promiselike.then()

    Type parameters

    • R

    • V

    Parameters

    • onFulfilled: (value: T) => R | Promise<R>
        • (value: T): R | Promise<R>
        • Parameters

          • value: T

          Returns R | Promise<R>

    • Optional onRejected: undefined | ((err: any) => V | Promise<V>)

    Returns Promise<R | V>

Legend

  • Constructor
  • Method
  • Inherited method

Generated using TypeDoc