From 055e1adfcd8dc1718e6bf2a481e0dbd9eead9454 Mon Sep 17 00:00:00 2001 From: Sang <11912225+hantatsang@users.noreply.github.com> Date: Thu, 25 Mar 2021 02:02:14 +1100 Subject: [PATCH] Export store's useful typescript definitions (#5887) fixes #5864 --- src/runtime/store/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index fda7099511..45877d861f 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; /** 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 {