Created
August 18, 2017 07:33
-
-
Save cartant/50506a049a75c0b71770530362f24559 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
export function publish<T>( | |
this: Observable<T>, | |
selector?: (source: Observable<T>) => Observable<T> | |
): Observable<T> | ConnectableObservable<T> { | |
return selector ? | |
multicast.call(this, () => new Subject<T>(), selector) : | |
multicast.call(this, new Subject<T>()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment