Module

x/effector/packages/effector/index.d.ts>Effect

Business logic with ease ☄️
Latest
interface Effect
implements UnitTargetable<Params>
import { type Effect } from "https://dotland.deno.dev/x/effector@effector-vue%4023.1.0/packages/effector/index.d.ts";

Container for (possibly async) side effects

Type Parameters

Params
Done
optional
Fail = Error

Call Signatures

(params: Params): Promise<Done>

Properties

kind: "effect"
readonly
done: Event<{ params: Params; result: Done; }>
readonly
doneData: Event<Done>
readonly
fail: Event<{ params: Params; error: Fail; }>
readonly
failData: Event<Fail>
readonly
finally: Event<{ status: "done"; params: Params; result: Done; } | { status: "fail"; params: Params; error: Fail; }>
readonly
use: { (handler: (params: Params) => Promise<Done> | Done): Effect<Params, Done, Fail>; getCurrent(): (params: Params) => Promise<Done>; }
pending: Store<boolean>
inFlight: Store<number>
compositeName: CompositeName
sid: string | null
shortName: string

Methods

watch(watcher: (payload: Params) => any): Subscription
filter<T extends Params>(config: { fn(payload: Params): payload is T; }): EventAsReturnType<T>
filter(config: { fn(payload: Params): boolean; }): EventAsReturnType<Params>
filterMap<T>(fn: (payload: Params) => T | undefined): EventAsReturnType<T>
map<T>(fn: (params: Params) => T): EventAsReturnType<T>
prepend<Before>(fn: (_: Before) => Params): EventCallable<Before>
subscribe(observer: Observer<Params>): Subscription
getType(): string