Forked from cartant/medium-rxjs-ref-count-teardown-connect.ts
Last active
July 20, 2019 22:46
-
-
Save LayZeeDK/0c5dd367e938518669d93706880f496a to your computer and use it in GitHub Desktop.
RxJS ≥6 version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const source = instrument(interval(100)); | |
const published = source.pipe(publish()); | |
const a = published.pipe(take(1)).subscribe(observer("a")); | |
const b = published.pipe(take(1)).subscribe(observer("b")); | |
const subscription = published.connect(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment