|
@@ -1,40 +1,39 @@
|
|
|
-declare interface Fn<T = any> {
|
|
|
- (...arg: T[]): T
|
|
|
-}
|
|
|
-
|
|
|
-declare type Nullable<T> = T | null
|
|
|
+import type { CSSProperties } from 'vue'
|
|
|
+declare global {
|
|
|
+ declare interface Fn<T = any> {
|
|
|
+ (...arg: T[]): T
|
|
|
+ }
|
|
|
|
|
|
-declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
|
|
|
+ declare type Nullable<T> = T | null
|
|
|
|
|
|
-declare type ElememtPlusSize = 'default' | 'small' | 'large'
|
|
|
+ declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
|
|
|
|
|
|
-declare type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'
|
|
|
+ declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
|
|
|
|
|
|
-declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
|
|
|
+ declare type ComponentRef<T> = InstanceType<T>
|
|
|
|
|
|
-declare type ComponentRef<T> = InstanceType<T>
|
|
|
+ declare type LocaleType = 'zh-CN' | 'en'
|
|
|
|
|
|
-declare type LocaleType = 'zh-CN' | 'en'
|
|
|
+ declare type AxiosHeaders =
|
|
|
+ | 'application/json'
|
|
|
+ | 'application/x-www-form-urlencoded'
|
|
|
+ | 'multipart/form-data'
|
|
|
|
|
|
-declare type AxiosHeaders =
|
|
|
- | 'application/json'
|
|
|
- | 'application/x-www-form-urlencoded'
|
|
|
- | 'multipart/form-data'
|
|
|
+ declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put'
|
|
|
|
|
|
-declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put'
|
|
|
+ declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
|
|
|
|
|
|
-declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
|
|
|
-
|
|
|
-declare interface AxiosConfig {
|
|
|
- params?: any
|
|
|
- data?: any
|
|
|
- url?: string
|
|
|
- method?: AxiosMethod
|
|
|
- headersType?: string
|
|
|
- responseType?: AxiosResponseType
|
|
|
-}
|
|
|
+ declare interface AxiosConfig {
|
|
|
+ params?: any
|
|
|
+ data?: any
|
|
|
+ url?: string
|
|
|
+ method?: AxiosMethod
|
|
|
+ headersType?: string
|
|
|
+ responseType?: AxiosResponseType
|
|
|
+ }
|
|
|
|
|
|
-declare interface IResponse<T = any> {
|
|
|
- code: string
|
|
|
- data: T extends any ? T : T & any
|
|
|
+ declare interface IResponse<T = any> {
|
|
|
+ code: string
|
|
|
+ data: T extends any ? T : T & any
|
|
|
+ }
|
|
|
}
|