Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions examples/typescript/watch/watch-example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ const req = await watch
}
console.log(apiObj);
},
// done callback is called if the watch terminates normally
// done callback is called if the watch terminates either normally or with an error
(err) => {
console.log(err);
if (err) {
console.error(err);
} else {
console.log('watch finished normally')
}
},
)
// watch returns a request object which you can use to abort the watch.
Expand Down