Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

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

Convert given stores to store with array which values updated upon changes in given ones

Type Parameters

T extends Store<any>

Returns

T extends Store<infer R> ? Store<[R]> : never

derived store

Convert array of stores to store with array which values updated upon changes in given ones

Type Parameters

State extends Tuple

Parameters

tuple: State

array of stores

Returns

Store<[K in keyof State]: State[K] extends Store<infer U> ? U : State[K]>

derived store updated upon changes in given ones

Convert object with stores to object store which fields updated upon changes in given ones

Parameters

shape: CombineState<State>

object with stores

Returns

derived store updated upon changes in given ones

Convert object with stores to object store which fields updated upon changes in given ones

Parameters

shape: State

object with stores

Returns

Store<[K in keyof State]: State[K] extends Store<infer U> ? U : State[K]>

derived store updated upon changes in given ones

Creates derived store from given one, transforming value using the function

Parameters

source: Store<A>

source store

fn: (source: A) => R

transformer function, accepts a store value

optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given one

Convert array of stores into derived store, transforming values using the function

Type Parameters

State extends Tuple
R

Parameters

tuple: State

array of stores

fn: (tuple: [K in keyof State]: State[K] extends Store<infer U> ? U : State[K]) => R

transformer function, accepts an array of values

optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert object with stores into derived store, transforming values using the function

Parameters

shape: State

object with stores

fn: (shape: [K in keyof State]: State[K] extends Store<infer U> ? U : State[K]) => R

transformer function, accepts object with values

optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
fn: (a: CombVal<A>, b: CombVal<B>) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
d: D
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
d: CombVal<D>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
d: D
e: E
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
d: CombVal<D>,
e: CombVal<E>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
d: D
e: E
f: F
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
d: CombVal<D>,
e: CombVal<E>,
f: CombVal<F>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
d: D
e: E
f: F
g: G
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
d: CombVal<D>,
e: CombVal<E>,
f: CombVal<F>,
g: CombVal<G>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Consider using combine(arrayOfStores, arrayOfValues => ...) instead

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
d: D
e: E
f: F
g: G
h: H
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
d: CombVal<D>,
e: CombVal<E>,
f: CombVal<F>,
g: CombVal<G>,
h: CombVal<H>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Consider using combine(arrayOfStores, arrayOfValues => ...) instead

Type Parameters

A
B
C
D
E
F
G
H
I
R

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
d: D
e: E
f: F
g: G
h: H
i: I
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
d: CombVal<D>,
e: CombVal<E>,
f: CombVal<F>,
g: CombVal<G>,
h: CombVal<H>,
i: CombVal<I>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Consider using combine(arrayOfStores, arrayOfValues => ...) instead

Type Parameters

A
B
C
D
E
F
G
H
I
J
R

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
d: D
e: E
f: F
g: G
h: H
i: I
j: J
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
d: CombVal<D>,
e: CombVal<E>,
f: CombVal<F>,
g: CombVal<G>,
h: CombVal<H>,
i: CombVal<I>,
j: CombVal<J>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores into derived store, transforming values using the function

Consider using combine(arrayOfStores, arrayOfValues => ...) instead

Type Parameters

A
B
C
D
E
F
G
H
I
J
K
R

Parameters

a: A

transformer function, accepts store values in separate arguments

b: B
c: C
d: D
e: E
f: F
g: G
h: H
i: I
j: J
k: K
fn: (
a: CombVal<A>,
b: CombVal<B>,
c: CombVal<C>,
d: CombVal<D>,
e: CombVal<E>,
f: CombVal<F>,
g: CombVal<G>,
h: CombVal<H>,
i: CombVal<I>,
j: CombVal<J>,
k: CombVal<K>,
) => R
optional
config: { skipVoid: boolean; }

Returns

derived store updated upon changes in given ones

Convert given stores to store with array which values updated upon changes in given ones

Type Parameters

T extends Tuple<Store<any> | any>

Parameters

...stores: T

Returns

Store<[K in keyof T]: T[K] extends Store<infer U> ? U : T[K]>

derived store