gohttpdUi/types/global.d.ts

36 lines
928 B
TypeScript
Raw Normal View History

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-04-16 09:42:40 +08:00
declare type ElememtPlusSize = 'default' | '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>
declare type LocaleType = 'zh-CN' | 'en'
2022-01-08 18:38:20 +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-04-19 10:51:47 +08:00
declare type AxiosConfig = {
params?: any
data?: any
2022-01-08 18:38:20 +08:00
url?: string
method?: AxiosMethod
2022-01-08 18:38:20 +08:00
headersType?: string
responseType?: AxiosResponseType
2022-01-08 18:38:20 +08:00
}