import { IReactionDisposer } from 'mobx';
import Cache from './Cache';
export default class PromiseMerger<V, ARGS> {
    timeout: number;
    cache: Cache<string, V>;
    promiseMap: Map<string | Symbol, Map<string, {
        resolves: Function[];
        rejects: Function[];
    }>>;
    waitID: any;
    callback: (codes: string[], args?: ARGS) => Promise<{
        [key: string]: V;
    }>;
    reaction: IReactionDisposer;
    constructor(callback: (codes: string[], args?: ARGS) => Promise<{
        [key: string]: V;
    }>, config: any, timeout?: number);
    dispose(): void;
    add(code: string, getBatchKey?: (defaultKey: Symbol) => string | Symbol, args?: ARGS): Promise<V>;
}
