ConnectableObservable

class ConnectableObservable<T> extends Observable { constructor(source: Observable<T>, subjectFactory: () => Subject<T>) protected _subject: Subject<T> protected _refCount: number protected _connection: Subscription source: Observable<T> protected subjectFactory: () => Subject<T> _subscribe(subscriber: Subscriber<T>) protected getSubject(): Subject<T> connect(): Subscription refCount(): Observable<T> // inherited from index/Observable static create: Function static if: typeof iif static throw: typeof throwError constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic) _isScalar: boolean source: Observable<any> operator: Operator<any, T> lift<R>(operator: Operator<T, R>): Observable<R> subscribe(observerOrNext?: PartialObserver<T> | ((value: T) => void), error?: (error: any) => void, complete?: () => void): Subscription _trySubscribe(sink: Subscriber<T>): TeardownLogic forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise<void> pipe(...operations: OperatorFunction<any, any>[]): Observable<any> toPromise(promiseCtor?: PromiseConstructorLike): Promise<T> }

Constructor

constructor(source: Observable<T>, subjectFactory: () => Subject<T>)

Parameters

source

Type: Observable.

subjectFactory

Type: () => Subject.

Properties

PropertyTypeDescription
_subject
_refCount
_connection
source Declared in constructor.
subjectFactory Declared in constructor.

Methods

_subscribe()

_subscribe(subscriber: Subscriber<T>)

Parameters

subscriber

Type: Subscriber.

getSubject()

protected getSubject(): Subject<T>

Parameters

There are no parameters.

Returns

Subject<T>

connect()

connect(): Subscription

Parameters

There are no parameters.

Returns

Subscription

refCount()

refCount(): Observable<T>

Parameters

There are no parameters.

Returns

Observable<T>