import { AnonymousSubject } from '../../Subject'; import { Subscriber } from '../../Subscriber'; import { Observable } from '../../Observable'; import { Subscription } from '../../Subscription'; import { Operator } from '../../Operator'; import { Observer, NextObserver } from '../../Observer'; export interface WebSocketSubjectConfig { url: string; protocol?: string | Array; resultSelector?: (e: MessageEvent) => T; openObserver?: NextObserver; closeObserver?: NextObserver; closingObserver?: NextObserver; WebSocketCtor?: { new (url: string, protocol?: string | Array): WebSocket; }; } /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ export declare class WebSocketSubject extends AnonymousSubject { url: string; protocol: string | Array; socket: WebSocket; openObserver: NextObserver; closeObserver: NextObserver; closingObserver: NextObserver; WebSocketCtor: { new (url: string, protocol?: string | Array): WebSocket; }; private _output; resultSelector(e: MessageEvent): any; /** * @param urlConfigOrSource * @return {WebSocketSubject} * @static true * @name webSocket * @owner Observable */ static create(urlConfigOrSource: string | WebSocketSubjectConfig): WebSocketSubject; constructor(urlConfigOrSource: string | WebSocketSubjectConfig | Observable, destination?: Observer); lift(operator: Operator): WebSocketSubject; private _resetState(); multiplex(subMsg: () => any, unsubMsg: () => any, messageFilter: (value: T) => boolean): Observable<{}>; private _connectSocket(); protected _subscribe(subscriber: Subscriber): Subscription; unsubscribe(): void; }