WatchSubscribe
type WatchSubscribe = (notify) => | (() => void | Promise<void>)| Promise<() => void | Promise<void>>;Defined in: src/storage/watch.ts:24
A change source. Called with a notify callback: wire your source to invoke it (optionally with
the changed key) on every change, and return an unsubscribe function (sync or async).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
notify |
(key?) => void |
Returns
Section titled “Returns”| (() => void | Promise<void>)
| Promise<() => void | Promise<void>>