specifies the result type for the effect
specifies the error type for the effect. Specify never, if the effect cannot error.
The Effect<Input>
type specifies a potentially impure function that takes an input and a Store as arguments
and returns an effectful result as Observable<Result>
.
It is the low-level abstraction used by rx-signals for side-effect isolation.
The high-level abstraction EffectSignalsFactory takes an EffectId
as configuration to access
the corresponding Effect
.
The args can be used to access additional input from the store (thus, the Effect
itself could also
be pure and just use something impure that was put into the store, e.g. another Effect
),
as well as the previousInput and previousResult.
The previousInput can be used e.g. to decide whether the effect must perform
a computation/query/etc., or if maybe the previousResult can be returned directly.
If the effect cannot error, use never
as Error
type. In that case, EffectResult<Result, Error>
will equal Result
.
the input of the previous function invocation, or NO_VALUE
SafeEffectResult
instead of EffectResult
, to give consumers the option to provide unhandled errors
the Store instance that will be passed to the function (e.g. to inject some other Effect)
Generated using TypeDoc
specifies the input type for the effect