function
stable
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>
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 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. |
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.
multicast(subject: Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>
subject | Type: |
UnaryFunction<Observable<T>, ConnectableObservable<T>>
multicast(subject: Subject<T>, selector: (shared: Observable<T>) => O): UnaryFunction<Observable<T>, ConnectableObservable<ObservedValueOf<O>>>
subject | Type: |
selector | Type: |
UnaryFunction<Observable<T>, ConnectableObservable<ObservedValueOf<O>>>
multicast(subjectFactory: (this: Observable<T>) => Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>
subjectFactory | Type: |
UnaryFunction<Observable<T>, ConnectableObservable<T>>
multicast(SubjectFactory: (this: Observable<T>) => Subject<T>, selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>
SubjectFactory | Type: |
selector | Type: |
OperatorFunction<T, ObservedValueOf<O>>
© 2015–2018 Google, Inc., Netflix, Inc., Microsoft Corp. and contributors.
Code licensed under an Apache-2.0 License. Documentation licensed under CC BY 4.0.
https://rxjs.dev/api/operators/multicast