Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Promise<void>
    • WaitReturn

Index

Properties

Promise

Promise: PromiseConstructor

__@toStringTag

__@toStringTag: string

cancel

cancel: function

取消等待,不执行后续逻辑。

Type declaration

    • (): void
    • Returns void

Methods

catch

  • catch<TResult>(onrejected?: function | undefined | null): Promise<void | TResult>
  • Attaches a callback for only the rejection of the Promise.

    Type parameters

    • TResult

    Parameters

    • Optional onrejected: function | undefined | null

      The callback to execute when the Promise is rejected.

    Returns Promise<void | TResult>

    A Promise for the completion of the callback.

finally

  • finally(onfinally?: function | undefined | null): Promise<void>
  • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

    Parameters

    • Optional onfinally: function | undefined | null

      The callback to execute when the Promise is settled (fulfilled or rejected).

    Returns Promise<void>

    A Promise for the completion of the callback.

then

  • then<TResult1, TResult2>(onfulfilled?: function | undefined | null, onrejected?: function | undefined | null): Promise<TResult1 | TResult2>
  • Attaches callbacks for the resolution and/or rejection of the Promise.

    Type parameters

    • TResult1

    • TResult2

    Parameters

    • Optional onfulfilled: function | undefined | null

      The callback to execute when the Promise is resolved.

    • Optional onrejected: function | undefined | null

      The callback to execute when the Promise is rejected.

    Returns Promise<TResult1 | TResult2>

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

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc