Last active
August 23, 2017 02:28
-
-
Save cartant/0af80fb59868506eb2a6ffe88f05de83 to your computer and use it in GitHub Desktop.
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
function multicast<T>(source: Observable<T>) { | |
const subject = new Subject<T>(); | |
source.subscribe(subject); | |
return subject; | |
} | |
const m = multicast(source); | |
m.subscribe(observer("a")); | |
m.subscribe(observer("b")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment