More comprehensible Stores type

If Stores can be a "Readable<any>" or a bunch of "Readable<any>"s why not make that array a type that is better readable (Readable<any>[]). Otherwise I have to parse an Array of Readables like that: "list as [Readable<any>, ...Array<Readable<any>>]" which is not very nice.
pull/5563/head
Nathan Herrmann 5 years ago committed by GitHub
parent 40c850d3e7
commit 21a9c94dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -113,7 +113,7 @@ export function writable<T>(value: T, start: StartStopNotifier<T> = noop): Writa
}
/** One or more `Readable`s. */
type Stores = Readable<any> | [Readable<any>, ...Array<Readable<any>>];
type Stores = Readable<any> | Readable<any>[];
/** One or more values from `Readable` stores. */
type StoresValues<T> = T extends Readable<infer U> ? U :

Loading…
Cancel
Save