UNPKG

choerodon-ui

Version:

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

21 lines (20 loc) 1.03 kB
import { AxiosInstance, AxiosRequestConfig } from 'axios'; import Field from '../data-set/Field'; import PromiseMerger from '../_util/PromiseMerger'; export declare type responseData = object[]; export declare type responseType = responseData | undefined; declare type callbackArgs = [(codes: string[]) => AxiosRequestConfig]; export declare class LookupCodeStore { get axios(): AxiosInstance; batchCallback: (codes: string[], args?: callbackArgs | undefined) => Promise<{ [key: string]: responseData; }>; merger: PromiseMerger<responseData, callbackArgs>; fetchLookupData(key: AxiosRequestConfig | string, axiosConfig?: AxiosRequestConfig): Promise<responseType>; fetchLookupDataInBatch(code: string, lookupBatchAxiosConfig: (codes: string[]) => AxiosRequestConfig): Promise<responseType>; getAxiosConfig(field: Field, noCache?: boolean): AxiosRequestConfig; getUrl(field: Field): string | undefined; clearCache(): void; } declare const _default: LookupCodeStore; export default _default;