types(watch): allow readonly arrays for watching multiple sources (#281)

This commit is contained in:
Adam Lewkowicz
2019-10-15 22:44:14 +02:00
committed by Evan You
parent 0b2573f3d1
commit 555e3be69d
2 changed files with 23 additions and 1 deletions

View File

@@ -56,7 +56,7 @@ export function watch<T>(
): StopHandle
// overload #3: array of multiple sources + cb
export function watch<T extends WatcherSource<unknown>[]>(
export function watch<T extends readonly WatcherSource<unknown>[]>(
sources: T,
cb: (
newValues: MapSources<T>,