Type Parameters

  • T

Implements

  • Promise<T>

Constructors

  • Type Parameters

    • T

    Parameters

    • executor: ((resolve, reject, onCancel) => void)
        • (resolve, reject, onCancel): void
        • Parameters

          • resolve: ((value) => void)
              • (value): void
              • Parameters

                • value: T | PromiseLike<T>

                Returns void

          • reject: ((reason?) => void)
              • (reason?): void
              • Parameters

                • Optional reason: any

                Returns void

          • onCancel: OnCancel

          Returns void

    Returns CancelablePromise<T>

Properties

#cancelHandlers: (() => void)[]

Type declaration

    • (): void
    • Returns void

#isCancelled: boolean
#isRejected: boolean
#isResolved: boolean
#promise: Promise<T>
#reject?: ((reason?) => void)

Type declaration

    • (reason?): void
    • Parameters

      • Optional reason: any

      Returns void

#resolve?: ((value) => void)

Type declaration

    • (value): void
    • Parameters

      • value: T | PromiseLike<T>

      Returns void

Accessors

  • get [toStringTag](): string
  • Returns string

  • get isCancelled(): boolean
  • Returns boolean

Methods

  • Returns void

  • Type Parameters

    • TResult = never

    Parameters

    • Optional onRejected: null | ((reason) => TResult | PromiseLike<TResult>)

    Returns Promise<T | TResult>

  • Parameters

    • Optional onFinally: null | (() => void)

    Returns Promise<T>