import { PureObject } from '../../types';

export type PagerMessage = {
    type: string;
    data?: any;
    from?: string;
    unique?: string;
};
export type PagerSubscribeOldParams<T> = {
    next: PagerFun<T>;
    unique?: string;
};
export type PagerFun<T> = (value: T) => any;
export declare class PagerSubject<T extends PagerMessage> {
    pagerKeysEventsMap: PureObject<Set<PagerFun<T>>>;
    pagerOldEventsSet: Set<PagerFun<T>>;
    pagerUniqueEventsMap: Map<string, PagerFun<T>>;
    pagerLog: PagerLogEventType[];
    constructor();
    next<K extends any[]>(pagerLoad: T): Promise<{ -readonly [P in keyof K]: Awaited<K[P]>; }>;
    subscribe(data: PagerSubscribeOldParams<T>): any;
    subscribe(data: PagerFun<T>): any;
    subscribe(data: string, callback: PagerFun<T>, unique?: string): any;
}
interface PagerLogEventType extends PagerMessage {
    time: Number;
}
export declare const pager: PagerSubject<PagerMessage>;
export {};
