Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

multicast

deprecated

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.

@deprecated

Will be removed in v8. To create a connectable observable, use connectable. If you're using refCount after multicast, use the share operator instead. multicast(subject), refCount() is equivalent to share({ connector: () => subject, resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }). Details: https://rxjs.dev/deprecations/multicasting

function multicast<T>(subject: Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>;
function multicast<T, O extends ObservableInput<any>>(subject: Subject<T>, selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>;
function multicast<T>(subjectFactory: () => Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>;
function multicast<T, O extends ObservableInput<any>>(subjectFactory: () => Subject<T>, selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>;
§
multicast<T>(subject: Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>
[src]

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.

§Type Parameters

§Parameters

§
subject: Subject<T>
[src]

The subject to multicast through.

§
multicast<T, O extends ObservableInput<any>>(subject: Subject<T>, selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>
[src]

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.

§Type Parameters

§
O extends ObservableInput<any>
[src]

§Parameters

§
subject: Subject<T>
[src]

The subject used to multicast.

§
selector: (shared: Observable<T>) => O
[src]

A setup function to setup the multicast

§Return Type

§

A function that returns an observable that mirrors the observable returned by the selector.

§
multicast<T>(subjectFactory: () => Subject<T>): UnaryFunction<Observable<T>, ConnectableObservable<T>>
[src]

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.

§Type Parameters

§Parameters

§
subjectFactory: () => Subject<T>
[src]

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.

§
multicast<T, O extends ObservableInput<any>>(subjectFactory: () => Subject<T>, selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>
[src]

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.

§Type Parameters

§
O extends ObservableInput<any>
[src]

§Parameters

§
subjectFactory: () => Subject<T>
[src]

A factory that creates the subject used to multicast.

§
selector: (shared: Observable<T>) => O
[src]

A function to setup the multicast and select the output.

§Return Type

§

A function that returns an observable that mirrors the observable returned by the selector.