From 45d4f2c0dbdc4c5ee91d0a2455b36b43019042ad Mon Sep 17 00:00:00 2001 From: hantatsang Date: Sat, 16 Jan 2021 22:46:20 +1100 Subject: [PATCH] export store's useful typescript definitions the store has some internal types that are useful and should be exported to help consumer apps typing their store implementations. --- src/runtime/store/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index 09040487f0..49f4b5d8be 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 {