diff --git a/types/global.d.ts b/types/global.d.ts index 3685ffbd..5e292687 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -1,29 +1,29 @@ export {} declare global { - declare interface Fn { + interface Fn { (...arg: T[]): T } - declare type Nullable = T | null + type Nullable = T | null - declare type ElRef = Nullable + type ElRef = Nullable - declare type Recordable = Record + type Recordable = Record - declare type ComponentRef = InstanceType + type ComponentRef = InstanceType - declare type LocaleType = 'zh-CN' | 'en' + type LocaleType = 'zh-CN' | 'en' - declare type AxiosHeaders = + type AxiosHeaders = | 'application/json' | 'application/x-www-form-urlencoded' | 'multipart/form-data' - declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT' + type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT' - declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' + type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' - declare interface AxiosConfig { + interface AxiosConfig { params?: any data?: any url?: string @@ -32,17 +32,17 @@ declare global { responseType?: AxiosResponseType } - declare interface IResponse { + interface IResponse { code: string data: T extends any ? T : T & any } - declare interface PageParam { + interface PageParam { pageSize?: number pageNo?: number } - declare interface Tree { + interface Tree { id: number name: string children?: Tree[] | any[]