Returns an Observable that emits the results of invoking a specified selector on items
emitted by a ConnectableObservable that shares a single subscription to the underlying stream.
multicast<T, R>(subjectOrSubjectFactory: Subject<T> | (() => Subject<T>), selector?: (source: Observable<T>) => Observable<R>): OperatorFunction<T, R>
Parameters
subjectOrSubjectFactory |
Factory function to create an intermediate subject through
which the source sequence's elements will be multicast to the selector function
or Subject to push source elements into.
|
selector |
Optional. Default is undefined .
Optional selector function that can use the multicasted source stream
as many times as needed, without causing multiple subscriptions to the source stream.
Subscribers to the given source will receive all notifications of the source from the
time of the subscription forward.
|
Returns
OperatorFunction<T, R>
: An Observable that emits the results of invoking the selector
on the items emitted by a ConnectableObservable
that shares a single subscription to
the underlying stream.
Description
Overloads
multicast(subject: Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>
Parameters
Returns
UnaryFunction<Observable<T>, ConnectableObservable<T>>
|
multicast(subject: Subject<T>, selector: (shared: Observable<T>) => O): UnaryFunction<Observable<T>, ConnectableObservable<ObservedValueOf<O>>>
Parameters
subject |
Type: Subject .
|
selector |
Type: (shared: Observable) => O .
|
Returns
UnaryFunction<Observable<T>, ConnectableObservable<ObservedValueOf<O>>>
|
multicast(subjectFactory: (this: Observable<T>) => Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>
Parameters
subjectFactory |
Type: (this: Observable) => Subject .
|
Returns
UnaryFunction<Observable<T>, ConnectableObservable<T>>
|
multicast(SubjectFactory: (this: Observable<T>) => Subject<T>, selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>
Parameters
SubjectFactory |
Type: (this: Observable) => Subject .
|
selector |
Type: (shared: Observable) => O .
|
Returns
OperatorFunction<T, ObservedValueOf<O>>
|