Add additional function overload for derived

pull/6172/head
Fielding Johnston 5 years ago
parent c7e820e08f
commit 54308f762d
No known key found for this signature in database
GPG Key ID: DCFA9E4F4F3FB9DB

@ -133,6 +133,20 @@ export function derived<S extends Stores, 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.
*
* @param stores - input stores
* @param fn - function callback that aggregates the values
* @param initial_value - initial value
*/
export function 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.

Loading…
Cancel
Save