github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/static_source/admin/types/global.d.ts (about) 1 import type { CSSProperties } from 'vue' 2 declare global { 3 declare interface Fn<T = any> { 4 (...arg: T[]): T 5 } 6 7 declare type Nullable<T> = T | null 8 9 declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T> 10 11 declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T> 12 13 declare type ComponentRef<T> = InstanceType<T> 14 15 declare type LocaleType = 'zh-CN' | 'en' | 'ru' 16 17 declare type AxiosHeaders = 18 | 'application/json' 19 | 'application/x-www-form-urlencoded' 20 | 'multipart/form-data' 21 22 declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put' 23 24 declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' 25 26 declare interface AxiosConfig { 27 params?: any 28 data?: any 29 url?: string 30 method?: AxiosMethod 31 headersType?: string 32 responseType?: AxiosResponseType 33 } 34 35 declare interface IResponse<T = any> { 36 code: string 37 data: T extends any ? T : T & any 38 } 39 }