global.d.ts 991 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. declare interface Fn<T = any> {
  2. (...arg: T[]): T
  3. }
  4. declare type Nullable<T> = T | null
  5. declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
  6. declare type ElememtPlusSize = 'default' | 'small' | 'large'
  7. declare type ElementPlusInfoType = 'success' | 'info' | 'warning' | 'danger'
  8. declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
  9. declare type ComponentRef<T> = InstanceType<T>
  10. declare type LocaleType = 'zh-CN' | 'en'
  11. declare type AxiosHeaders =
  12. | 'application/json'
  13. | 'application/x-www-form-urlencoded'
  14. | 'multipart/form-data'
  15. declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put'
  16. declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
  17. declare type AxiosConfig = {
  18. params?: any
  19. data?: any
  20. url?: string
  21. method?: AxiosMethod
  22. headersType?: string
  23. responseType?: AxiosResponseType
  24. }
  25. declare type PageResult<T> = {
  26. list: T[]
  27. total?: number
  28. }