-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeta.d.ts
82 lines (70 loc) · 1.63 KB
/
meta.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
export interface MetaIndex {
classes: Record<string, string>
members: Record<string, string[]>
}
export interface JavaClass {
name: string
simpleName: string
sourceName: string
modifiers: string[]
nesting?: 'top_level' | 'member' | 'local' | 'anonymous'
superClass?: JavaType
interfaces?: JavaType[]
enumValues?: string[]
fields?: JavaField[]
constructors?: JavaConstructor[]
methods?: JavaMethod[]
doc?: Javadoc
}
export interface JavaField {
name: string
modifiers: string[]
type: JavaDesc
constant?: string | number | boolean
doc?: Javadoc
}
export type JavaConstructor = JavaExecutable
export type JavaMethod = JavaExecutable & {
name: string
}
export interface JavaExecutable {
modifiers: string[]
typeId: string
parameters: JavaParameter[]
return: JavaDesc
vararg?: boolean
throws?: JavaDesc[]
doc?: Javadoc
}
export interface JavaParameter {
name: string
type: JavaDesc
doc?: string
}
export interface JavaType {
name: string
signature: string
parameters?: JavaType[]
}
export interface JavaDesc {
name: string
desc?: string
typeVar?: string
binaryName?: string
arrayOf?: string
}
export interface Javadoc {
summary: string
text: string
properties?: JavadocBlock[]
}
export type JavadocBlock = JavadocBlockText | JavadocBlockClass
export interface JavadocBlockText {
type: 'author' | 'deprecated' | 'return' | 'serial' | 'since' | 'unknown'
text: string
}
export interface JavadocBlockClass {
type: 'exception' | 'throws' | 'provides' | 'uses'
cls: string
text: string
}