From d24454038490e17126b18cbf43dbe707f05a7142 Mon Sep 17 00:00:00 2001 From: Ignatius Bagus Date: Tue, 4 May 2021 09:06:46 +0700 Subject: [PATCH] set writable value to optional --- src/runtime/store/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/store/index.ts b/src/runtime/store/index.ts index cf15db5250..985f8c792d 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -61,7 +61,7 @@ export function readable(value: T, start: StartStopNotifier): Readable * @param {*=}value initial value * @param {StartStopNotifier=}start start and stop notifications for subscriptions */ -export function writable(value: T, start: StartStopNotifier = noop): Writable { +export function writable(value?: T, start: StartStopNotifier = noop): Writable { let stop: Unsubscriber; const subscribers: Array> = [];