Skip to content

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

Parameter Type
notify (key?) => void

| (() => void | Promise<void>) | Promise<() => void | Promise<void>>