import { TxCallback } from './tx-callback'; import { TxTask } from './tx-task'; import { TxSubscribeOptions } from './tx-subscribe-options'; export declare class TxUnSubscribe { from: TxSubscribe; index: number; constructor(from: TxSubscribe, index: number); unsubscribe(): void; readonly subscribe: TxSubscribe; } export declare class TxSubscribe { dataCB: TxCallback[]; errorCB: TxCallback[]; completeCB: TxCallback[]; from: T; limit: number; name: string; /** * * @param from - object that use this subscribe * @param limit - limit the number of subscribers, 0 => unlimited */ constructor(from?: T, limit?: number); subscribe(dataCB: TxCallback, errorCB?: TxCallback, completeCB?: (any?: any) => void): TxUnSubscribe; next(data: TxTask, options?: TxSubscribeOptions): void; error(error: TxTask, options?: TxSubscribeOptions): void; unsubscribe(index?: number): void; setName(name: string): void; getName(): string; setFrom(from: T): void; /** * return if nuber of subscribes in reach to its limit */ private isLimit; getSubscribesLength(): number[]; }