Skip to content

Commit

Permalink
Add more detail about finally
Browse files Browse the repository at this point in the history
  • Loading branch information
benlesh committed Dec 19, 2023
1 parent d564481 commit 6a25bca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,10 @@ We propose the following operators in addition to the `Observable` interface:
- `finally()`
- Like `Promise.finally()`, it takes a callback which gets fired after the
observable completes in any way (`complete()`/`error()`).
- Returns an `Observable`, because observable is lazy, finalization
is setup ahead of subscription. This allows for specific finalization to
happen after each step in a reactive chain.
- Returns an `Observable` that mirrors the source observable exactly. The callback
passed to `finally` is fired when a subscription to the resulting observable is terminated
for _any reason_. Either immediately after the source completes or errors, or when the consumer
unsubscribes by aborting the subscription.

Versions of the above are often present in userland implementations of
observables as they are useful for observable-specific reasons, but in addition
Expand Down

0 comments on commit 6a25bca

Please sign in to comment.