-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathTools_Docgen.resi
87 lines (81 loc) · 1.72 KB
/
Tools_Docgen.resi
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
type field = {
name: string,
docstrings: array<string>,
signature: string,
optional: bool,
deprecated?: string,
}
@tag("kind")
type constructorPayload = | @as("inlineRecord") InlineRecord({fields: array<field>})
type constructor = {
name: string,
docstrings: array<string>,
signature: string,
deprecated?: string,
payload?: constructorPayload,
}
@tag("kind")
type detail =
| @as("record") Record({items: array<field>})
| @as("variant") Variant({items: array<constructor>})
type source = {
filepath: string,
line: int,
col: int,
}
@tag("kind")
type rec item =
| @as("value")
Value({
id: string,
docstrings: array<string>,
signature: string,
name: string,
deprecated?: string,
source: source,
})
| @as("type")
Type({
id: string,
docstrings: array<string>,
signature: string,
name: string,
deprecated?: string,
source: source,
/** Additional documentation for constructors and record fields, if available. */
detail?: detail,
})
| @as("module")
Module({
id: string,
docstrings: array<string>,
deprecated?: string,
name: string,
source: source,
items: array<item>,
})
| @as("moduleType")
ModuleType({
id: string,
docstrings: array<string>,
deprecated?: string,
name: string,
source: source,
items: array<item>,
})
| @as("moduleAlias")
ModuleAlias({
id: string,
docstrings: array<string>,
name: string,
source: source,
items: array<item>,
})
type doc = {
name: string,
deprecated: option<string>,
docstrings: array<string>,
source: source,
items: array<item>,
}
let decodeFromJson: Js.Json.t => doc