chore: remove overloads numbers in comments (#2976)
This commit is contained in:
parent
2151fbb102
commit
e109f7b898
@ -80,7 +80,7 @@ const INITIAL_WATCHER_VALUE = {}
|
||||
|
||||
type MultiWatchSources = (WatchSource<unknown> | object)[]
|
||||
|
||||
// overload #1: array of multiple sources + cb
|
||||
// overload: array of multiple sources + cb
|
||||
export function watch<
|
||||
T extends MultiWatchSources,
|
||||
Immediate extends Readonly<boolean> = false
|
||||
@ -90,7 +90,7 @@ export function watch<
|
||||
options?: WatchOptions<Immediate>
|
||||
): 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<Immediate>
|
||||
): WatchStopHandle
|
||||
|
||||
// overload #2: single source + cb
|
||||
// overload: single source + cb
|
||||
export function watch<T, Immediate extends Readonly<boolean> = false>(
|
||||
source: WatchSource<T>,
|
||||
cb: WatchCallback<T, Immediate extends true ? (T | undefined) : T>,
|
||||
options?: WatchOptions<Immediate>
|
||||
): WatchStopHandle
|
||||
|
||||
// overload #3: watching reactive object w/ cb
|
||||
// overload: watching reactive object w/ cb
|
||||
export function watch<
|
||||
T extends object,
|
||||
Immediate extends Readonly<boolean> = false
|
||||
|
Loading…
Reference in New Issue
Block a user