rxjs / 7.5.5 / api / index / function / connectable.html /

connectable

function stable

Creates an observable that multicasts once connect() is called on it.

connectable<T>(source: ObservableInput<T>, config: ConnectableConfig<T> = DEFAULT_CONFIG): Connectable<T>

Parameters

source ObservableInput<T>

The observable source to make connectable.

config ConnectableConfig<T>

Optional. Default is DEFAULT_CONFIG.

The configuration object for connectable.

Returns

Connectable<T>: A "connectable" observable, that has a connect() method, that you must call to connect the source to all consumers through the subject provided as the connector.

© 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/index/function/connectable