Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Promise<T>

Add some helpful methods for Promise.prototype

Type parameters

  • T

Hierarchy

  • Promise

Index

Methods

Methods

always

  • always(fn: (this: this, v: any, success: boolean) => any | Promise<any>): Promise<T>
  • The function will always be executed in Promise case of success or failure.
    输入的函数在Promise执行成功或失败后都会被执行。

    Parameters

    • fn: (this: this, v: any, success: boolean) => any | Promise<any>
        • (this: this, v: any, success: boolean): any | Promise<any>
        • Parameters

          • this: this
          • v: any
          • success: boolean

          Returns any | Promise<any>

    Returns Promise<T>