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
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<
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