From 21a9c94dc6b9fa8da9b62167139f461d850819c4 Mon Sep 17 00:00:00 2001 From: Nathan Herrmann Date: Thu, 22 Oct 2020 18:23:50 +0200 Subject: [PATCH] More comprehensible Stores type If Stores can be a "Readable" or a bunch of "Readable"s why not make that array a type that is better readable (Readable[]). Otherwise I have to parse an Array of Readables like that: "list as [Readable, ...Array>]" which is not very nice. --- 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 09040487f0..1dfce9c8cf 100644 --- a/src/runtime/store/index.ts +++ b/src/runtime/store/index.ts @@ -113,7 +113,7 @@ export function writable(value: T, start: StartStopNotifier = noop): Writa } /** One or more `Readable`s. */ -type Stores = Readable | [Readable, ...Array>]; +type Stores = Readable | Readable[]; /** One or more values from `Readable` stores. */ type StoresValues = T extends Readable ? U :