feat(mock): Add mock
This commit is contained in:
31
types/global.d.ts
vendored
Normal file
31
types/global.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
declare interface Fn<T = any> {
|
||||
(...arg: T[]): T
|
||||
}
|
||||
|
||||
declare type Nullable<T> = T | null
|
||||
|
||||
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
|
||||
|
||||
declare type ElememtPlusSzie = 'default' | 'small' | 'large'
|
||||
|
||||
declare type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'
|
||||
|
||||
declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
|
||||
|
||||
declare type ComponentRef<T> = InstanceType<T>
|
||||
|
||||
declare type LocaleType = 'zh-CN' | 'en'
|
||||
|
||||
declare type AxiosConfig = {
|
||||
params?: Recordable
|
||||
data?: Recordable
|
||||
url?: string
|
||||
method?: 'get' | 'post' | 'delete' | 'put'
|
||||
headersType?: string
|
||||
responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
|
||||
}
|
||||
|
||||
declare type AxiosHeadersType =
|
||||
| 'application/json'
|
||||
| 'application/x-www-form-urlencoded'
|
||||
| 'multipart/form-data'
|
||||
Reference in New Issue
Block a user