chore: revert prettier

This commit is contained in:
Evan You
2019-10-22 11:52:29 -04:00
parent b5886189ba
commit af57ad110f
9 changed files with 97 additions and 109 deletions

View File

@@ -61,7 +61,7 @@ export function watch<T>(
): StopHandle
// overload #3: array of multiple sources + cb
export function watch<T extends readonly WatcherSource<unknown>[]>(
export function watch<T extends Readonly<WatcherSource<unknown>[]>>(
sources: T,
cb: WatchHandler<MapSources<T>>,
options?: WatchOptions
@@ -94,10 +94,11 @@ function doWatch(
let getter: () => any
if (isArray(source)) {
getter = () =>
source.map(s =>
isRef(s)
? s.value
: callWithErrorHandling(s, instance, ErrorCodes.WATCH_GETTER)
source.map(
s =>
isRef(s)
? s.value
: callWithErrorHandling(s, instance, ErrorCodes.WATCH_GETTER)
)
} else if (isRef(source)) {
getter = () => source.value