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

publishBehavior

deprecated

Creates a ConnectableObservable that utilizes a BehaviorSubject.

@deprecated

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

function publishBehavior<T>(initialValue: T): UnaryFunction<Observable<T>, ConnectableObservable<T>>;
§
publishBehavior<T>(initialValue: T): UnaryFunction<Observable<T>, ConnectableObservable<T>>
[src]

§Type Parameters

§Parameters

§
initialValue: T
[src]

The initial value passed to the BehaviorSubject.