abortable
abortable<
E,A>(factory,onError):object
Defined in: Core/TaskResult.ts:288
Creates a TaskResult paired with an abort handle. When abort() is called the
AbortSignal passed to the factory is fired, cancelling any in-flight operation.
The abort error is transformed by onError into a typed Err.
If an outer signal is also present (passed at the call site), aborting it propagates into the internal controller.
Type Parameters
Section titled “Type Parameters”E
A
Parameters
Section titled “Parameters”factory
Section titled “factory”(signal) => Promise<A>
onError
Section titled “onError”(e) => E
Returns
Section titled “Returns”object
abort()
Section titled “abort()”abort: () =>
void
Returns
Section titled “Returns”void
task:
TaskResult<E,A>