UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

22 lines (21 loc) 829 B
import { IReactionDisposer } from 'mobx'; import { AxiosRequestConfig } from 'axios'; import Cache from './Cache'; export default class PromiseMerger<V> { timeout: number; cache: Cache<string, V>; promiseMap: Map<string | Symbol, Map<string, { resolves: Function[]; rejects: Function[]; }>>; waitID: any; callback: (codes: string[], lookupBatchAxiosConfig: (codes: string[]) => AxiosRequestConfig) => Promise<{ [key: string]: V; }>; reaction: IReactionDisposer; constructor(callback: (codes: string[], lookupBatchAxiosConfig: (codes: string[]) => AxiosRequestConfig) => Promise<{ [key: string]: V; }>, config: any, timeout?: number); dispose(): void; add(code: string, lookupBatchAxiosConfig: (codes: string[]) => AxiosRequestConfig): Promise<V>; }