sdk.watcher.waitforfirstwatch
Home > @matterway/sdk > Watcher > waitForFirstWatch
Watcher.waitForFirstWatch() function
Starts several watchers, and resolves with key of the first which matches.
Signature:
export declare function waitForFirstWatch<T extends Record<string, WaitForWatchSpec<any>>>(ctx: Context, matchers: T): Promise<keyof T>;
Parameters
Parameter | Type | Description |
---|---|---|
ctx | Context | |
matchers | T |
Returns:
Promise<keyof T>
Resolves with first match found.