/** Callback to inform of a value updates. */ export type Subscriber = (value: T) => void; /** Unsubscribes from value updates. */ export type Unsubscriber = () => void; /** Callback to update a value. */ export type Updater = (value: T) => T; /** Cleanup logic callback. */ type Invalidator = (value?: T) => void; /** Start and stop notification callbacks. */ export type StartStopNotifier = (set: Subscriber) => Unsubscriber | void; /** Writable interface for both updating and subscribing. */ export interface Writable { /** * Subscribe on value changes. * @param run subscription callback * @param invalidate cleanup callback */ subscribe(this: void, run: Subscriber, invalidate?: Invalidator): Unsubscriber; /** * Set value and inform subscribers. * @param value to set */ set(this: void, value: T): void; /** * Update value using callback and inform subscribers. * @param updater callback */ update(this: void, updater: Updater): void; } export declare function safe_not_equal(a: unknown, b: unknown): {}; /** * 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 function writable(value?: T, start?: StartStopNotifier): Writable; export {}; //# sourceMappingURL=stores.d.ts.map