import { t_HubInternal as _HubInternal } from "./hub"; import { EventIterable } from "./generator"; import { IChannel } from "./IChannel"; import { EventData } from "./types"; import { GeneratorBuilder, IGeneratorBuilder } from "./generatorBuilder"; import { IHub } from "./IHub"; export declare class _ChannelInternal; } = any> implements IChannel { private _hub; private onDisposes; private listens; private disposed; readonly id: string; currentGeneratorBuilder: GeneratorBuilder; constructor(_hub: _HubInternal, id: string); get generator(): IGeneratorBuilder; get isDisposed(): boolean; get hub(): IHub; send(type: T, data?: Actions[T]): any; listen(type: string | string[], callback: (data?: EventData) => any): () => void; onDispose(func: (chan?: IChannel) => void): void; dispose(): void; checkSend(type: string, data: any): Indexable; runGenerator(generatorFunc: () => Generator, onCompletion?: (result?: any) => void, onError?: (error: any) => void): () => void; /** Returns a cancel function */ runIterator(iter: Generator, onCompletion?: (result?: any) => void, onError?: (error: any) => void): () => void; } export declare type IChannelMessage = D; export declare function _createChannel(hub: _HubInternal, id: string): _ChannelInternal; declare type Indexable = { [x: string]: T; [x: number]: T; }; export {};