ReactiveActionSource
Duck-type for objects that build a ReactiveActionStore on demand via reactiveStore().
Satisfied by PendingRpcRequest<T>. The [] argument tuple is intentional — the operation's
arguments are already baked into the pending request, so each dispatch() re-fires the same
call.
The optional perRequestSignal factory is invoked on every dispatch to provide a fresh signal
for that attempt. Combined with the store's internal per-dispatch controller via
AbortSignal.any, so aborting either cancels the in-flight call.
- For "kill the store permanently": return the same cancellable signal on every call
(
() => killCtrl.signal); abortingkillCtrlmakes every future dispatch start with an already-aborted signal. - For "per-attempt timeout": return a fresh
AbortSignal.timeout(N)each call; each dispatch gets its own clock.
Example
See
Type Parameters
| Type Parameter | Description |
|---|---|
T | The value type resolved by the wrapped operation. |
Methods
reactiveStore()
Parameters
| Parameter | Type |
|---|---|
options? | { perRequestSignal?: () => | AbortSignal | undefined; } |
options.perRequestSignal? | () => | AbortSignal | undefined |
Returns
ReactiveActionStore<[], T>