@ac-essentials/misc-util
    Preparing search index...

    Class AbortablePromise<T>

    A Promise that is abortable via an AbortSignal.

    When the signal is aborted, the onAbort callback is called and the promise is rejected. If the signal is already aborted when the promise is created, the onAbort callback is called immediately and the promise is rejected. The executor function is still called in all cases to maintain consistency with the standard Promise behavior.

    The executor function is called immediately (synchronously) upon construction, similar to a standard Promise.

    Type Parameters

    • T

      The type of the promise result.

    Implements

    • Promise<T>
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    The abortable properties.

    Accessors

    Methods

    • 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: PromiseOnFinally | null

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

      Returns Promise<T>

      A Promise for the completion of the callback.