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

publish

deprecated

Returns a connectable observable that, when connected, will multicast all values through a single underlying Subject instance.

@deprecated

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

function publish<T>(): UnaryFunction<Observable<T>, ConnectableObservable<T>>;
function publish<T, O extends ObservableInput<any>>(selector: (shared: Observable<T>) => O): OperatorFunction<T, ObservedValueOf<O>>;
§

Returns a connectable observable that, when connected, will multicast all values through a single underlying Subject instance.

§Type Parameters

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

Returns an observable, that when subscribed to, creates an underlying Subject, provides an observable view of it to a selector function, takes the observable result of that selector function and subscribes to it, sending its values to the consumer, then connects the subject to the original source.

§Type Parameters

§
O extends ObservableInput<any>
[src]

§Parameters

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

A function used to setup multicasting prior to automatic connection.