Skip to content

Commit 6e321c4

Browse files
author
puhui999
committed
update: 去除没必要的declare
1 parent 3c6bf37 commit 6e321c4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

types/global.d.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
export {}
22
declare global {
3-
declare interface Fn<T = any> {
3+
interface Fn<T = any> {
44
(...arg: T[]): T
55
}
66

7-
declare type Nullable<T> = T | null
7+
type Nullable<T> = T | null
88

9-
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
9+
type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>
1010

11-
declare type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
11+
type Recordable<T = any, K = string> = Record<K extends null | undefined ? string : K, T>
1212

13-
declare type ComponentRef<T> = InstanceType<T>
13+
type ComponentRef<T> = InstanceType<T>
1414

15-
declare type LocaleType = 'zh-CN' | 'en'
15+
type LocaleType = 'zh-CN' | 'en'
1616

17-
declare type AxiosHeaders =
17+
type AxiosHeaders =
1818
| 'application/json'
1919
| 'application/x-www-form-urlencoded'
2020
| 'multipart/form-data'
2121

22-
declare type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT'
22+
type AxiosMethod = 'get' | 'post' | 'delete' | 'put' | 'GET' | 'POST' | 'DELETE' | 'PUT'
2323

24-
declare type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
24+
type AxiosResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream'
2525

26-
declare interface AxiosConfig {
26+
interface AxiosConfig {
2727
params?: any
2828
data?: any
2929
url?: string
@@ -32,17 +32,17 @@ declare global {
3232
responseType?: AxiosResponseType
3333
}
3434

35-
declare interface IResponse<T = any> {
35+
interface IResponse<T = any> {
3636
code: string
3737
data: T extends any ? T : T & any
3838
}
3939

40-
declare interface PageParam {
40+
interface PageParam {
4141
pageSize?: number
4242
pageNo?: number
4343
}
4444

45-
declare interface Tree {
45+
interface Tree {
4646
id: number
4747
name: string
4848
children?: Tree[] | any[]

0 commit comments

Comments
 (0)