abortable
abortable<
A>(factory):object
Defined in: Core/Task.ts:483
Creates a Task paired with an abort handle. Calling abort() cancels the
current in-flight call immediately. Unlike a one-shot abort, calling task()
again after abort() starts a fresh call with a new signal.
Each invocation of task() automatically cancels the previous in-flight call,
making it safe to call repeatedly (e.g. on user input) without leaking promises.
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”A
Parameters
Section titled “Parameters”factory
Section titled “factory”(signal) => Promise<A>
Returns
Section titled “Returns”object
abort: () =>
void
Returns
Section titled “Returns”void
task:
Task<A>