2021-12-11 20:50:05 +08:00
|
|
|
declare interface Fn<T = any> {
|
|
|
|
(...arg: T[]): T
|
|
|
|
}
|
|
|
|
|
|
|
|
declare type Nullable<T> = T | null
|
|
|
|
|
|
|
|
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
|
|
|
|
|
2022-03-26 11:30:24 +08:00
|
|
|
declare type ElememtPlusSzie = '' | 'small' | 'large'
|
2021-12-11 20:50:05 +08:00
|
|
|
|
|
|
|
declare type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'
|
|
|
|
|
2021-12-13 16:55:58 +08:00
|
|
|
declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
|
2021-12-12 09:34:02 +08:00
|
|
|
|
|
|
|
declare type ComponentRef<T> = InstanceType<T>
|
2022-01-03 09:41:34 +08:00
|
|
|
|
|
|
|
declare type LocaleType = 'zh-CN' | 'en'
|
2022-01-08 18:38:20 +08:00
|
|
|
|
2022-01-09 10:57:50 +08:00
|
|
|
declare type AxiosHeaders =
|
|
|
|
| 'application/json'
|
|
|
|
| 'application/x-www-form-urlencoded'
|
|
|
|
| 'multipart/form-data'
|
|
|
|
|
|
|
|
declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put'
|
|
|
|
|
|
|
|
declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
|
|
|
|
|
2022-01-11 10:47:10 +08:00
|
|
|
declare type AxiosConfig<T = Recordable, K = Recordable> = {
|
|
|
|
params?: T
|
|
|
|
data?: K
|
2022-01-08 18:38:20 +08:00
|
|
|
url?: string
|
2022-01-09 10:57:50 +08:00
|
|
|
method?: AxiosMethod
|
2022-01-08 18:38:20 +08:00
|
|
|
headersType?: string
|
2022-01-09 10:57:50 +08:00
|
|
|
responseType?: AxiosResponseType
|
2022-01-08 18:38:20 +08:00
|
|
|
}
|