import { Subject, Observable, OperatorFunction } from 'rxjs'; export interface ObservableFn { (param?: A): Observable; } export declare enum NotificationType { init = "init", busy = "busy", idle = "idle", paramFunc = "paramFunc", inputNext = "inputNext", inputComplete = "inputComplete", inputError = "inputError", outputFuncError = "outputFuncError", outputNext = "outputNext", outputError = "outputError", outputComplete = "outputComplete", close = "close", enable = "enable", disable = "disable" } export interface ChannelNotification { type: NotificationType; name?: string; data?: any; error?: any; } export interface NotificationFn { (input: ChannelNotification): any; } export interface ParameterFn { (input: A): T; } export declare class Channel { private fn; private closed; private input; private output; private enabled; private inputBusy; private outputBusy; private name; private notifications; private debug; private paramFn; private notificationFn; constructor(fn: ObservableFn, options?: { input?: Subject; output?: Subject; enabled?: boolean; name?: string; debug?: boolean; paramFn?: ParameterFn; notificationFn?: NotificationFn; }); isBusy(): boolean; isInputBusy(): boolean; isOutputBusy(): boolean; next(value?: A): Channel; emit(value: T): void; observe(value?: A, ...ops: OperatorFunction[]): Observable; link(observer: Observable, ...ops: OperatorFunction[]): void; pipe(observer: Observable, ...ops: OperatorFunction[]): void; asObservable(): Observable; observeNotifications(): Observable; protected emitNotification(notification: ChannelNotification): void; enable(): Channel; disable(): Channel; close(): void; } export declare class ChannelSwitch { private channels; constructor(...channels: { key: any; channel: Channel; }[]); set(key: any, channel: Channel): Channel; get(key: any): Channel; isBusy(key: any): boolean; isInputBusy(key: any): boolean; isOutputBusy(key: any): boolean; next(key: any, value?: any): Channel; emit(key: any, value: any): false | void; observe(key: any, value?: any, ...ops: OperatorFunction[]): Observable; link(key: any, observer: Observable, ...ops: OperatorFunction[]): void; pipe(key: any, observer: Observable, ...ops: OperatorFunction[]): void; asObservable(key: any): Observable; observeNotifications(key: any): Observable; enable(key: any): Channel; disable(key: any): Channel; close(key: any): void; } export interface DSObservableFn { (value?: any): Observable; } export interface DSOperator { operator: OperatorFunction; id: any; } export interface IObserveOptions { behave: boolean; } export interface DSInputOptions { } export interface DSOutputOptions { behave: boolean; } export interface DSInputEvent { id: any; options?: DSInputOptions; value?: any; } export interface DSEvent { input: DSInputEvent; output: any; } export declare class DSPipe { private ds; private key; private obs; private ops; private enabled; private sub; constructor(ds: IObservableDS, key: any, obs: Observable, ops: OperatorFunction[], enabled?: boolean); isConnected(): boolean; connect(): void; disconnect(): void; setOperators(...ops: OperatorFunction[]): void; enable(): void; disable(): void; } export interface IObservableDS { connect(): void; isConnected(): boolean; addObservable(key: any, os: DSObservableFn | Observable, options?: IObserveOptions): void; next(key: any, value: any, options?: DSInputOptions): void; observe(key: any, value?: any, options?: DSOutputOptions): Observable; disconnect(): void; addPipe(obs: Observable, key: any, ...operators: OperatorFunction[]): DSPipe; asObservable(): Observable; destroy(): any; clearPipes(...pipes: DSPipe[]): any; clearAllPipes(): any; getPipes(): DSPipe[]; } export declare class ObservableDS implements IObservableDS { private connected; private fnMap; private subjectMap; private input$; private inputSub; private events$; private pipes; constructor(options?: { autoconnect?: boolean; key?: any; obs?: DSObservableFn | Observable; }); isConnected(): boolean; connect(): void; protected relay(event: DSInputEvent, obs: Observable, subject: Subject): void; protected emit(event: DSEvent): void; asObservable(): Observable; disconnect(): void; next(key: any, value: any, options?: DSInputOptions): void; addPipe(obs: Observable, key: any, ...operators: OperatorFunction[]): DSPipe; clearPipes(...pipes: DSPipe[]): void; clearAllPipes(): void; getPipes(): DSPipe[]; addObservable(key: any, obs: DSObservableFn | Observable, options?: IObserveOptions): void; observe(key: any, value?: any, options?: DSOutputOptions): Observable; destroy(): void; }