Module

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

Business logic with ease ☄️
Latest
function scopeBind
import { scopeBind } from "https://dotland.deno.dev/x/effector@effector-vue%4023.1.0/packages/effector/index.d.ts";

Bind event to a scope to be called later.

When scope is not provided this method retrieve scope implicitly from scope of the handler (effect handler or watch function) inside which it's being called

Parameters

event to bind

optional
opts: { scope?: Scope; safe?: boolean; }

Returns

(payload: T) => void

function which will trigger an event in a given scope

Bind effect to a scope to be called later.

When scope is not provided this method retrieve scope implicitly from scope of the handler (effect handler or watch function) inside which it's being called

Type Parameters

P
D
optional
F = Error

Parameters

unit: Effect<P, D, F>

effect to bind

optional
opts: { scope?: Scope; safe?: boolean; }

Returns

(params: P) => Promise<D>

function which will trigger an effect in a given scope and returns a promise with a result

Bind arbitary callback to a scope to be called later. When scope is not provided this method retrieve scope implicitly from scope of the handler (effect handler or watch function) inside which it's being called

Type Parameters

T extends Function

Parameters

fn: T

effect to bind

optional
opts: { scope?: Scope; safe?: boolean; }

Returns

function which will trigger an effect in a given scope and returns a promise with a result