data-cap
    Preparing search index...

    Function rejectOnAbort

    • Wraps promise so it rejects immediately if signal aborts. Never affects promise itself -- does not cancel or otherwise influence any underlying shared work (see coordinator.ts: a caller giving up on waiting is not the same as the shared execution being cancelled for every caller).

      Type Parameters

      • T

      Parameters

      • promise: Promise<T>
      • signal: AbortSignal

      Returns Promise<T>