@ladesa-ro/api-client-fetch - v1.0.0-next.35
    Preparing search index...

    Class CancelablePromise<T>

    Type Parameters

    • T

    Implements

    Index

    Constructors

    • Type Parameters

      • T

      Parameters

      • executor: (
            resolve: (value: T | PromiseLike<T>) => void,
            reject: (reason?: unknown) => void,
            onCancel: OnCancel,
        ) => void

      Returns CancelablePromise<T>

    Properties

    cancelHandlers: (() => void)[]
    promise: Promise<T>

    Accessors

    • get "[toStringTag]"(): string

      Returns string

    • get isCancelled(): boolean

      Returns boolean

    Methods

    • Returns void

    • Attaches a callback for only the rejection of the Promise.

      Type Parameters

      • TResult = never

      Parameters

      • OptionalonRejected: null | ((reason: unknown) => TResult | PromiseLike<TResult>)

      Returns Promise<T | TResult>

      A Promise for the completion of the callback.

    • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

      Parameters

      • OptionalonFinally: null | (() => void)

      Returns Promise<T>

      A Promise for the completion of the callback.

    • Attaches callbacks for the resolution and/or rejection of the Promise.

      Type Parameters

      • TResult1 = T
      • TResult2 = never

      Parameters

      Returns Promise<TResult1 | TResult2>

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