From 247a848200ee0ca2832a5d40685f1a647d00a0d5 Mon Sep 17 00:00:00 2001 From: Simon Bundgaard-Egeberg Date: Mon, 20 Jul 2020 11:46:23 +0200 Subject: [PATCH] Exported types from store for configureable ts store classes --- src/runtime/store/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index 2bbfdfcd60..2aa17442b8 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -1,19 +1,19 @@ import { run_all, subscribe, noop, safe_not_equal, is_function, get_store_value } from 'svelte/internal'; /** Callback to inform of a value updates. */ -type Subscriber = (value: T) => void; +export type Subscriber = (value: T) => void; /** Unsubscribes from value updates. */ -type Unsubscriber = () => void; +export type Unsubscriber = () => void; /** Callback to update a value. */ -type Updater = (value: T) => T; +export type Updater = (value: T) => T; /** Cleanup logic callback. */ -type Invalidator = (value?: T) => void; +export type Invalidator = (value?: T) => void; /** Start and stop notification callbacks. */ -type StartStopNotifier = (set: Subscriber) => Unsubscriber | void; +export type StartStopNotifier = (set: Subscriber) => Unsubscriber | void; /** Readable interface for subscribing. */ export interface Readable { @@ -201,4 +201,4 @@ export function derived(stores: Stores, fn: Function, initial_value?: T): Rea * Get the current value from a store by subscribing and immediately unsubscribing. * @param store readable */ -export { get_store_value as get }; \ No newline at end of file +export { get_store_value as get };