sdk.watcher.watch
Home > @matterway/sdk > Watcher > watch
Watcher.watch() function
Starts watching a matcher function, and trigger whenever it changes from matching to not.
Signature:
export declare function watch<T>(ctx: Context, spec: WatcherSpec<T>): Watcher<T>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | Context object. |
spec | WatcherSpec<T> | Options for running the watcher. |
Returns:
Watcher<T>