We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
done
1 parent ef2953e commit f5b87a7Copy full SHA for f5b87a7
examples/typescript/watch/watch-example.ts
@@ -26,9 +26,13 @@ const req = await watch
26
}
27
console.log(apiObj);
28
},
29
- // done callback is called if the watch terminates normally
+ // done callback is called if the watch terminates either normally or with an error
30
(err) => {
31
- console.log(err);
+ if (err) {
32
+ console.log(err);
33
+ } else {
34
+ console.log('watch done')
35
+ }
36
37
)
38
// watch returns a request object which you can use to abort the watch.
0 commit comments