@@ -80,7 +80,7 @@ const INITIAL_WATCHER_VALUE = {}
80
80
81
81
type MultiWatchSources = ( WatchSource < unknown > | object ) [ ]
82
82
83
- // overload #1 : array of multiple sources + cb
83
+ // overload: array of multiple sources + cb
84
84
export function watch <
85
85
T extends MultiWatchSources ,
86
86
Immediate extends Readonly < boolean > = false
@@ -90,7 +90,7 @@ export function watch<
90
90
options ?: WatchOptions < Immediate >
91
91
) : WatchStopHandle
92
92
93
- // overload #2 for multiple sources w/ `as const`
93
+ // overload: multiple sources w/ `as const`
94
94
// watch([foo, bar] as const, () => {})
95
95
// somehow [...T] breaks when the type is readonly
96
96
export function watch <
@@ -102,14 +102,14 @@ export function watch<
102
102
options ?: WatchOptions < Immediate >
103
103
) : WatchStopHandle
104
104
105
- // overload #2 : single source + cb
105
+ // overload: single source + cb
106
106
export function watch < T , Immediate extends Readonly < boolean > = false > (
107
107
source : WatchSource < T > ,
108
108
cb : WatchCallback < T , Immediate extends true ? ( T | undefined ) : T > ,
109
109
options ?: WatchOptions < Immediate >
110
110
) : WatchStopHandle
111
111
112
- // overload #3 : watching reactive object w/ cb
112
+ // overload: watching reactive object w/ cb
113
113
export function watch <
114
114
T extends object ,
115
115
Immediate extends Readonly < boolean > = false
0 commit comments