Skip to content

Commit df8c4d4

Browse files
committed
test: add docs format test case for #1411
1 parent 6e9b8ce commit df8c4d4

6 files changed

Lines changed: 481 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "ClientMessage",
3+
"kind": "typeAlias",
4+
"typeAliasDef": {
5+
"tsType": {
6+
"repr": "",
7+
"kind": "union",
8+
"union": [
9+
{
10+
"repr": "",
11+
"kind": "typeLiteral",
12+
"typeLiteral": {
13+
"properties": [
14+
{
15+
"name": "op",
16+
"optional": false,
17+
"tsType": {
18+
"repr": "voiceUpdate",
19+
"kind": "literal",
20+
"literal": { "kind": "string", "string": "voiceUpdate" }
21+
}
22+
},
23+
{
24+
"name": "guildId",
25+
"optional": false,
26+
"tsType": { "repr": "string", "kind": "keyword", "keyword": "string" }
27+
}
28+
],
29+
"methods": [],
30+
"callSignatures": [],
31+
"indexSignatures": []
32+
}
33+
},
34+
{
35+
"repr": "",
36+
"kind": "typeLiteral",
37+
"typeLiteral": {
38+
"properties": [
39+
{
40+
"name": "op",
41+
"optional": false,
42+
"tsType": {
43+
"repr": "play",
44+
"kind": "literal",
45+
"literal": { "kind": "string", "string": "play" }
46+
}
47+
},
48+
{
49+
"name": "guildId",
50+
"optional": false,
51+
"tsType": { "repr": "string", "kind": "keyword", "keyword": "string" }
52+
}
53+
],
54+
"methods": [],
55+
"callSignatures": [],
56+
"indexSignatures": []
57+
}
58+
}
59+
]
60+
},
61+
"typeParams": []
62+
}
63+
}
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
{
2+
"name": "LinkDaveClient",
3+
"kind": "interface",
4+
"interfaceDef": {
5+
"extends": [],
6+
"constructors": [],
7+
"methods": [],
8+
"properties": [
9+
{
10+
"name": "on",
11+
"computed": false,
12+
"optional": false,
13+
"tsType": {
14+
"repr": "",
15+
"kind": "fnOrConstructor",
16+
"fnOrConstructor": {
17+
"constructor": false,
18+
"tsType": { "repr": "this", "kind": "this", "this": true },
19+
"params": [
20+
{
21+
"kind": "identifier",
22+
"name": "event",
23+
"optional": false,
24+
"tsType": {
25+
"repr": "K",
26+
"kind": "typeRef",
27+
"typeRef": { "typeName": "K" }
28+
}
29+
},
30+
{
31+
"kind": "identifier",
32+
"name": "listener",
33+
"optional": false,
34+
"tsType": {
35+
"repr": "",
36+
"kind": "fnOrConstructor",
37+
"fnOrConstructor": {
38+
"constructor": false,
39+
"tsType": { "repr": "void", "kind": "keyword", "keyword": "void" },
40+
"params": [
41+
{
42+
"kind": "identifier",
43+
"name": "data",
44+
"optional": false,
45+
"tsType": {
46+
"repr": "",
47+
"kind": "indexedAccess",
48+
"indexedAccess": {
49+
"readonly": false,
50+
"objType": {
51+
"repr": "ManagerEvents",
52+
"kind": "typeRef",
53+
"typeRef": { "typeName": "ManagerEvents" }
54+
},
55+
"indexType": {
56+
"repr": "K",
57+
"kind": "typeRef",
58+
"typeRef": { "typeName": "K" }
59+
}
60+
}
61+
}
62+
}
63+
],
64+
"typeParams": []
65+
}
66+
}
67+
}
68+
],
69+
"typeParams": [
70+
{
71+
"name": "K",
72+
"constraint": {
73+
"repr": "",
74+
"kind": "typeOperator",
75+
"typeOperator": {
76+
"operator": "keyof",
77+
"tsType": {
78+
"repr": "ManagerEvents",
79+
"kind": "typeRef",
80+
"typeRef": { "typeName": "ManagerEvents" }
81+
}
82+
}
83+
}
84+
}
85+
]
86+
}
87+
}
88+
},
89+
{
90+
"name": "emit",
91+
"computed": false,
92+
"optional": false,
93+
"tsType": {
94+
"repr": "",
95+
"kind": "fnOrConstructor",
96+
"fnOrConstructor": {
97+
"constructor": false,
98+
"tsType": { "repr": "boolean", "kind": "keyword", "keyword": "boolean" },
99+
"params": [
100+
{
101+
"kind": "identifier",
102+
"name": "event",
103+
"optional": false,
104+
"tsType": {
105+
"repr": "K",
106+
"kind": "typeRef",
107+
"typeRef": { "typeName": "K" }
108+
}
109+
},
110+
{
111+
"kind": "identifier",
112+
"name": "data",
113+
"optional": false,
114+
"tsType": {
115+
"repr": "",
116+
"kind": "indexedAccess",
117+
"indexedAccess": {
118+
"readonly": false,
119+
"objType": {
120+
"repr": "ManagerEvents",
121+
"kind": "typeRef",
122+
"typeRef": { "typeName": "ManagerEvents" }
123+
},
124+
"indexType": {
125+
"repr": "K",
126+
"kind": "typeRef",
127+
"typeRef": { "typeName": "K" }
128+
}
129+
}
130+
}
131+
}
132+
],
133+
"typeParams": [
134+
{
135+
"name": "K",
136+
"constraint": {
137+
"repr": "",
138+
"kind": "typeOperator",
139+
"typeOperator": {
140+
"operator": "keyof",
141+
"tsType": {
142+
"repr": "ManagerEvents",
143+
"kind": "typeRef",
144+
"typeRef": { "typeName": "ManagerEvents" }
145+
}
146+
}
147+
}
148+
}
149+
]
150+
}
151+
}
152+
}
153+
],
154+
"callSignatures": [],
155+
"indexSignatures": [],
156+
"typeParams": []
157+
}
158+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{
2+
"name": "ManagerEvents",
3+
"kind": "interface",
4+
"interfaceDef": {
5+
"extends": [{ "repr": "Events", "kind": "typeRef", "typeRef": { "typeName": "Events" } }],
6+
"constructors": [],
7+
"methods": [],
8+
"properties": [
9+
{
10+
"name": "[ManagerEventName.NodeAdd]",
11+
"computed": true,
12+
"optional": false,
13+
"tsType": {
14+
"repr": "",
15+
"kind": "typeLiteral",
16+
"typeLiteral": {
17+
"properties": [
18+
{
19+
"name": "node",
20+
"optional": false,
21+
"tsType": {
22+
"repr": "Node",
23+
"kind": "typeRef",
24+
"typeRef": { "typeName": "Node" }
25+
}
26+
}
27+
],
28+
"methods": [],
29+
"callSignatures": [],
30+
"indexSignatures": []
31+
}
32+
}
33+
},
34+
{
35+
"name": "[ManagerEventName.NodeRemove]",
36+
"computed": true,
37+
"optional": false,
38+
"tsType": {
39+
"repr": "",
40+
"kind": "typeLiteral",
41+
"typeLiteral": {
42+
"properties": [
43+
{
44+
"name": "node",
45+
"optional": false,
46+
"tsType": {
47+
"repr": "Node",
48+
"kind": "typeRef",
49+
"typeRef": { "typeName": "Node" }
50+
}
51+
}
52+
],
53+
"methods": [],
54+
"callSignatures": [],
55+
"indexSignatures": []
56+
}
57+
}
58+
},
59+
{
60+
"name": "[ManagerEventName.NodeReconnectAttempt]",
61+
"computed": true,
62+
"optional": false,
63+
"tsType": {
64+
"repr": "",
65+
"kind": "typeLiteral",
66+
"typeLiteral": {
67+
"properties": [
68+
{
69+
"name": "node",
70+
"optional": false,
71+
"tsType": {
72+
"repr": "Node",
73+
"kind": "typeRef",
74+
"typeRef": { "typeName": "Node" }
75+
}
76+
},
77+
{
78+
"name": "attempt",
79+
"optional": false,
80+
"tsType": {
81+
"repr": "number",
82+
"kind": "keyword",
83+
"keyword": "number"
84+
}
85+
}
86+
],
87+
"methods": [],
88+
"callSignatures": [],
89+
"indexSignatures": []
90+
}
91+
}
92+
}
93+
],
94+
"callSignatures": [],
95+
"indexSignatures": [],
96+
"typeParams": []
97+
}
98+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "RawVoiceServerUpdate",
3+
"kind": "typeAlias",
4+
"typeAliasDef": {
5+
"tsType": {
6+
"repr": "Pick",
7+
"kind": "typeRef",
8+
"typeRef": {
9+
"typeName": "Pick",
10+
"typeParams": [
11+
{
12+
"repr": "GatewayVoiceServerUpdateDispatchData",
13+
"kind": "typeRef",
14+
"typeRef": { "typeName": "GatewayVoiceServerUpdateDispatchData" }
15+
},
16+
{
17+
"repr": "",
18+
"kind": "union",
19+
"union": [
20+
{
21+
"repr": "token",
22+
"kind": "literal",
23+
"literal": { "kind": "string", "string": "token" }
24+
},
25+
{
26+
"repr": "guild_id",
27+
"kind": "literal",
28+
"literal": { "kind": "string", "string": "guild_id" }
29+
},
30+
{
31+
"repr": "endpoint",
32+
"kind": "literal",
33+
"literal": { "kind": "string", "string": "endpoint" }
34+
}
35+
]
36+
}
37+
]
38+
}
39+
},
40+
"typeParams": []
41+
}
42+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "SendToShardFn",
3+
"kind": "typeAlias",
4+
"typeAliasDef": {
5+
"tsType": {
6+
"repr": "",
7+
"kind": "fnOrConstructor",
8+
"fnOrConstructor": {
9+
"constructor": false,
10+
"tsType": { "repr": "void", "kind": "keyword", "keyword": "void" },
11+
"params": [
12+
{
13+
"kind": "identifier",
14+
"name": "guildId",
15+
"optional": false,
16+
"tsType": { "repr": "string", "kind": "keyword", "keyword": "string" }
17+
},
18+
{
19+
"kind": "identifier",
20+
"name": "payload",
21+
"optional": false,
22+
"tsType": {
23+
"repr": "GatewayVoiceStateUpdate",
24+
"kind": "typeRef",
25+
"typeRef": { "typeName": "GatewayVoiceStateUpdate" }
26+
}
27+
}
28+
],
29+
"typeParams": []
30+
}
31+
},
32+
"typeParams": []
33+
}
34+
}

0 commit comments

Comments
 (0)