ReactorDataOf
ReactorDataOf<
R,M> =ReactorReturnOk<ServiceOf<R>,M,TransformOf<R>>
Defined in: core/src/types/reactor.ts:350
What a reactor’s method resolves with: the Ok value of a Candid Result,
or the whole result of a method that returns none, in the reactor’s own
form. It is what callMethod, a mutation and its execute() resolve with,
ReactorReturnOk<Service, M, Transform> with the service and transform read
from typeof reactor.
The query hooks and factories cache it as
ReactorQueryData<ReactorDataOf<R, M>>, which is the same type unless the
result can be undefined: TanStack Query reserves undefined for “not
cached”, so such a result is cached as null.
Type Parameters
Section titled “Type Parameters”R extends object
The reactor’s type, as typeof reactor.
M extends FunctionName<ServiceOf<R>>
The method.
Example
Section titled “Example”const ledger = new DisplayReactor<Ledger>({ clientManager, name: "ledger", idlFactory })
type Balance = ReactorDataOf<typeof ledger, "icrc1_balance_of"> // string