function deprecated operator
Will be removed in v8. Use the connectable observable, the connect operator or the share operator instead. See the overloads below for equivalent replacement examples of this operator's behaviors. Details: https://rxjs.dev/deprecations/multicasting
multicast<T, R>(subjectOrSubjectFactory: Subject<T> | (() => Subject<T>), selector?: (source: Observable<T>) => Observable<R>): OperatorFunction<T, R> subjectOrSubjectFactory | Subject<T> | (() => Subject<T>) | |
selector | (source: Observable<T>) => Observable<R> | Optional. Default is |
multicast(subject: Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>An operator that creates a ConnectableObservable, that when connected, with the connect method, will use the provided subject to multicast the values from the source to all consumers.
subject | Subject<T> | The subject to multicast through. |
UnaryFunction<Observable<T>, ConnectableObservable<T>>: A function that returns a ConnectableObservable
multicast(subject: Subject<T>, selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>Because this is deprecated in favor of the connect operator, and was otherwise poorly documented, rather than duplicate the effort of documenting the same behavior, please see documentation for the connect operator.
subject | Subject<T> | The subject used to multicast. |
selector | (shared: Observable<T>) => O | A setup function to setup the multicast |
OperatorFunction<T, ObservedValueOf<O>>: A function that returns an observable that mirrors the observable returned by the selector.
multicast(subjectFactory: () => Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>An operator that creates a ConnectableObservable, that when connected, with the connect method, will use the provided subject to multicast the values from the source to all consumers.
subjectFactory | () => Subject<T> | A factory that will be called to create the subject. Passing a function here will cause the underlying subject to be "reset" on error, completion, or refCounted unsubscription of the source. |
UnaryFunction<Observable<T>, ConnectableObservable<T>>: A function that returns a ConnectableObservable
multicast(subjectFactory: () => Subject<T>, selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>Because this is deprecated in favor of the connect operator, and was otherwise poorly documented, rather than duplicate the effort of documenting the same behavior, please see documentation for the connect operator.
subjectFactory | () => Subject<T> | A factory that creates the subject used to multicast. |
selector | (shared: Observable<T>) => O | A function to setup the multicast and select the output. |
OperatorFunction<T, ObservedValueOf<O>>: A function that returns an observable that mirrors the observable returned by the selector.
© 2015–2022 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