Function derived
- derived<S extends Stores, T>(
stores: S,
fn: (
values: StoresValues<S>,
set: (value: T) => void,
update: (fn: Updater<T>) => void,
) => void | Unsubscriber,
initial_value?: T,
): Readable<T> Type Parameters
- S extends Stores
- T
Parameters
- stores: S
- fn: (
values: StoresValues<S>,
set: (value: T) => void,
update: (fn: Updater<T>) => void,
) => void | Unsubscriber Optional
initial_value: T
Returns Readable<T>
- derived<S extends Stores, T>(
stores: S,
fn: (values: StoresValues<S>) => T,
initial_value?: T,
): Readable<T> Derived value store by synchronizing one or more readable stores and applying an aggregation function over its input values.
Type Parameters
- S extends Stores
- T
Parameters
- stores: S
- fn: (values: StoresValues<S>) => T
Optional
initial_value: T
Returns Readable<T>
Derived value store by synchronizing one or more readable stores and applying an aggregation function over its input values.
https://svelte.dev/docs/svelte-store#derived