-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
23 lines (23 loc) · 1.18 KB
/
Copy pathindex.d.ts
File metadata and controls
23 lines (23 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import * as Interface from '../interface';
import { Writable } from './writable';
/**
* Create a `Writable` store that allows both updating and reading by subscription.
* @param {*=}value initial value
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
*/
export declare const writable: <T>(value: T, start?: Interface.StartStopNotifier<T>) => Writable<T>;
/**
* Creates a `Readable` store that allows reading by subscription.
* @param value initial value
* @param {StartStopNotifier}start start and stop notifications for subscriptions
*/
export declare const readable: <T>(value?: T | undefined, start?: Interface.StartStopNotifier<T>) => Interface.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 initialValue - when used asynchronously
*/
export declare function derived<S extends Interface.Stores, T>(stores: S, callback: (values: Interface.StoresValues<S>, set: (value: T) => void) => Interface.Unsubscriber | void, initialValue?: T): Interface.Readable<T>;