import { attach } from "https://deno.land/x/effector@effector-vue%4023.1.0/packages/effector/index.d.ts";
Method for creating state-dependent effect and transforming effect payloads
Returns
Effect<Params, EffectResult<FX>, EffectError<FX>>
new effect
Method for transforming effect payloads
Type Parameters
FX extends Effect<any, any, any>
Parameters
config: { effect: FX; mapParams: FN extends (...args: any[]) => NoInfer<EffectParams<FX>> ? FN : never; name?: string; }
Returns
FN extends (...args: infer Args) => NoInfer<EffectParams<FX>> ? Effect<Args["length"] extends 0 ? void : 0 | 1 extends Args["length"] ? Args[0] | void : Args[0], EffectResult<FX>, EffectError<FX>> : never
new effect
Method for transforming effect payloads
Type Parameters
FX extends Effect<any, any, any>
Parameters
config: { effect: FX; mapParams: (params: Params) => NoInfer<EffectParams<FX>>; name?: string; }
Returns
Effect<Params, EffectResult<FX>, EffectError<FX>>
new effect
Method for passing state values to effects
Returns
Effect<void, EffectResult<FX>, EffectError<FX>>
new effect
Creates state-dependent effect with provided function handler. Allows the one to omit intermediate effects and declare effect handler right next to data source
Type Parameters
FX extends (state: GetShapeValue<States>, params: any) => any
Creates independent instance of given effect. Used to add subscribers to effect call in a particular business case
Type Parameters
FX extends Effect<any, any, any>
Parameters
config: { effect: FX; name?: string; }
Returns
Effect<EffectParams<FX>, EffectResult<FX>, EffectError<FX>>
new effect linked to given one
Method for creating state-dependent effect and transforming effect payload
Type Parameters
FX extends Effect<any, any, any>
FN extends ((params: any, source: GetShapeValue<States>) => NoInfer<EffectParams<FX>>)
Returns
Effect<Parameters<FN>[0], EffectResult<FX>, EffectError<FX>>
new effect