Waits for a watcher to match, and resolves with the value.
const options: WaitForWatchSpec<YourType> = { wait: yourWaitFunction, match: yourMatchFunction,};waitForWatch(ctx, options) .then(match => console.log('Watcher matched with:', match)) .catch(err => console.error('Error in waitForWatch:', err)); Copy
const options: WaitForWatchSpec<YourType> = { wait: yourWaitFunction, match: yourMatchFunction,};waitForWatch(ctx, options) .then(match => console.log('Watcher matched with:', match)) .catch(err => console.error('Error in waitForWatch:', err));
Waits for a watcher to match, and resolves with the value.