diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index 45877d861f..cf15db5250 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -133,6 +133,20 @@ export function derived( initial_value?: T ): Readable; +/** + * 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( + stores: S, + fn: (values: StoresValues) => T, + initial_value?: T +): Readable; + /** * Derived value store by synchronizing one or more readable stores and * applying an aggregation function over its input values.