From cab4ae267ffca5dca88ea026d1a62765b53f497a Mon Sep 17 00:00:00 2001 From: Ignatius Bagus Date: Tue, 4 May 2021 10:46:51 +0700 Subject: [PATCH] add readable overloads for empty initializer --- src/runtime/store/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index 985f8c792d..96daf11249 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -50,7 +50,9 @@ const subscriber_queue = []; * @param value initial value * @param {StartStopNotifier}start start and stop notifications for subscriptions */ -export function readable(value: T, start: StartStopNotifier): Readable { +export function readable(): Readable; +export function readable(value: T, start: StartStopNotifier): Readable; +export function readable(value?: T, start?: StartStopNotifier): Readable { return { subscribe: writable(value, start).subscribe };