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

    Function abortable

    • Wraps a function to make it abortable. The wrapped function will listen to the provided abort signal and call the onAbort callback if the signal is aborted.

      If the signal is already aborted, the wrapped function will throw before calling the original function.

      Note: This function should not be used to wrap functions that return promises. Use abortableAsync instead.

      Type Parameters

      • A extends unknown[]
      • R
      • T

      Parameters

      Returns Callable<A, R, T>

      A new function that is abortable.