-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.ts
117 lines (104 loc) · 1.86 KB
/
types.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
export type ContextType =
| "unknown"
| "function"
| "mixin"
| "placeholder"
| "variable"
| "css";
export interface Context {
type: ContextType;
name: string;
code: string;
value?: string;
scope?: "private" | "global";
line: Range;
}
export type Example = {
type?: string;
description?: string;
code: string;
};
export type File = {
path: string;
name: string;
};
export type Link = {
url: string;
caption?: string;
};
export type Parameter = {
name: string;
type?: string;
default?: string;
description?: string;
};
export type Property = {
path: string;
type?: string;
name?: string;
default?: string;
description?: string;
};
export type Require = {
name: string;
type: string;
autofill?: boolean;
description?: string;
external?: boolean;
url?: string;
item?: ParseResult;
context?: Context;
};
export type Range = {
start: number;
end: number;
};
export type Return = {
type: string;
description?: string;
};
export type See = {
name: string;
type?: string;
description?: string;
context?: Context;
};
export type Since = {
version?: string;
description?: string;
};
export type UsedBy = {
description: string;
context: Context;
};
export interface ParseResult {
access?: "public" | "private" | "auto";
alias?: string | string[];
aliased?: string[];
author?: string[];
commentRange: Range;
content?: string;
context: Context;
deprecated?: string;
description: string;
example?: Example[];
file?: File;
group?: string[];
ignore?: string[];
link?: Link[];
/**
* The value of the name annotation if set, or the name of the function/mixin/variable as declared in the code.
*/
name?: string;
output?: string;
parameter?: Parameter[];
property?: Property[];
require?: Require[];
return?: Return;
see?: ParseResult[];
since?: Since[];
throws?: string[];
todo?: string[];
type?: string[];
usedBy?: ParseResult[];
}