From d843a6f9086c930a970a87118c348b87c47a32be Mon Sep 17 00:00:00 2001 From: Ben Lesh Date: Tue, 21 Nov 2023 14:54:07 -0600 Subject: [PATCH] Adds the catch operator to the README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4a42a24..cf09e82 100644 --- a/README.md +++ b/README.md @@ -368,6 +368,8 @@ interface Observable { Observable take(unsigned long long); Observable drop(unsigned long long); Observable flatMap(Mapper mapper); + Observable catch(Mapper mapper); + Promise> toArray(optional PromiseOptions options); Promise forEach(Visitor callback, optional PromiseOptions options); @@ -501,6 +503,10 @@ If the subscriber has already been aborted (i.e., `subscriber.signal.aborted` is We propose the following operators in addition to the `Observable` interface: +- `catch()` + - Like `Promise.catch()`, it takes a callback which gets fired after the source + observable errors. It will then map to a new observable, returned by the callback, + unless the error is rethrown. - `takeUntil(Observable)` - Returns an observable that mirrors the one that this method is called on, until the input observable emits its first value