From e109f7b8983169773d2aaacb376aa816cc98d711 Mon Sep 17 00:00:00 2001 From: Yang Mingshan Date: Thu, 4 Feb 2021 14:34:40 +0800 Subject: [PATCH] chore: remove overloads numbers in comments (#2976) --- packages/runtime-core/src/apiWatch.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/runtime-core/src/apiWatch.ts b/packages/runtime-core/src/apiWatch.ts index f0ff31fc..55bbbb8f 100644 --- a/packages/runtime-core/src/apiWatch.ts +++ b/packages/runtime-core/src/apiWatch.ts @@ -80,7 +80,7 @@ const INITIAL_WATCHER_VALUE = {} type MultiWatchSources = (WatchSource | object)[] -// overload #1: array of multiple sources + cb +// overload: array of multiple sources + cb export function watch< T extends MultiWatchSources, Immediate extends Readonly = false @@ -90,7 +90,7 @@ export function watch< options?: WatchOptions ): WatchStopHandle -// overload #2 for multiple sources w/ `as const` +// overload: multiple sources w/ `as const` // watch([foo, bar] as const, () => {}) // somehow [...T] breaks when the type is readonly export function watch< @@ -102,14 +102,14 @@ export function watch< options?: WatchOptions ): WatchStopHandle -// overload #2: single source + cb +// overload: single source + cb export function watch = false>( source: WatchSource, cb: WatchCallback, options?: WatchOptions ): WatchStopHandle -// overload #3: watching reactive object w/ cb +// overload: watching reactive object w/ cb export function watch< T extends object, Immediate extends Readonly = false