raceAbort
raceAbort<
T>(promise,signal):Promise<T>
Defined in: packages/core/src/async/abort.ts:11
Race a pending promise against an AbortSignal so the caller sees an
AbortError the instant the signal aborts — even when the underlying
driver cannot cancel the in-flight request. The original promise is not
cancelled for drivers without native signal support (libsql/sqlite); it
resolves in the background, but its result is discarded.
When signal is undefined, the promise is returned unchanged (no
overhead for the common case).
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”promise
Section titled “promise”Promise<T>
signal
Section titled “signal”AbortSignal | undefined
Returns
Section titled “Returns”Promise<T>