sdk.watcher.watchonce
Home > @matterway/sdk > Watcher > watchOnce
Watcher.watchOnce() function
Watches a match function until it matches, then stops.
Signature:
export declare function watchOnce<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>