Skip to content

Commit 05cb53e

Browse files
authored
Organize/consolidate inlay hint tests (#55332)
1 parent f5e73d7 commit 05cb53e

File tree

175 files changed

+2196
-1784
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+2196
-1784
lines changed
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
const f1: F1 = (a, b) => { }
2+
^
3+
{
4+
"text": ": string",
5+
"position": 58,
6+
"kind": "Type",
7+
"whitespaceBefore": true
8+
}
9+
10+
const f1: F1 = (a, b) => { }
11+
^
12+
{
13+
"text": ": number",
14+
"position": 61,
15+
"kind": "Type",
16+
"whitespaceBefore": true
17+
}
18+
19+
const f2: F1 = (a, b: number) => { }
20+
^
21+
{
22+
"text": ": string",
23+
"position": 87,
24+
"kind": "Type",
25+
"whitespaceBefore": true
26+
}
27+
28+
foo1((a) => { })
29+
^
30+
{
31+
"text": ": string",
32+
"position": 157,
33+
"kind": "Type",
34+
"whitespaceBefore": true
35+
}
36+
37+
foo2((a) => { })
38+
^
39+
{
40+
"text": ": 2 | 3",
41+
"position": 232,
42+
"kind": "Type",
43+
"whitespaceBefore": true
44+
}
45+
46+
foo3(a => {
47+
^
48+
{
49+
"text": ": (c: (d: 2 | 3) => void) => ...",
50+
"position": 331,
51+
"kind": "Type",
52+
"whitespaceBefore": true
53+
}
54+
55+
a(d => {})
56+
^
57+
{
58+
"text": ": 2 | 3",
59+
"position": 344,
60+
"kind": "Type",
61+
"whitespaceBefore": true
62+
}
63+
64+
foo4(1, a => { })
65+
^
66+
{
67+
"text": ": number",
68+
"position": 409,
69+
"kind": "Type",
70+
"whitespaceBefore": true
71+
}
72+
73+
const foo5: F2 = (a) => { }
74+
^
75+
{
76+
"text": ": { a: number; b: string; }",
77+
"position": 492,
78+
"kind": "Type",
79+
"whitespaceBefore": true
80+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
bar: function (x?): void {
2+
^
3+
{
4+
"text": ": boolean",
5+
"position": 87,
6+
"kind": "Type",
7+
"whitespaceBefore": true
8+
}
9+
10+
set foo(value) { this.#value = value; }
11+
^
12+
{
13+
"text": ": number",
14+
"position": 250,
15+
"kind": "Type",
16+
"whitespaceBefore": true
17+
}

tests/baselines/reference/inlayHintsShouldWork64.baseline renamed to tests/baselines/reference/inlayHintsInteractiveOverloadCall.baseline

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,216 +1,216 @@
1-
"hello",
2-
^
1+
call(1);
2+
^
33
{
44
"text": "",
5-
"position": 183,
5+
"position": 131,
66
"kind": "Parameter",
77
"whitespaceAfter": true,
88
"displayParts": [
99
{
1010
"text": "a",
1111
"span": {
12-
"start": 18,
12+
"start": 22,
1313
"length": 1
1414
},
15-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
15+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
1616
},
1717
{
1818
"text": ":"
1919
}
2020
]
2121
}
2222

23-
undefined,
24-
^
23+
call(1, 2);
24+
^
2525
{
2626
"text": "",
27-
"position": 196,
27+
"position": 140,
2828
"kind": "Parameter",
2929
"whitespaceAfter": true,
3030
"displayParts": [
3131
{
3232
"text": "b",
3333
"span": {
34-
"start": 33,
34+
"start": 44,
3535
"length": 1
3636
},
37-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
37+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
3838
},
3939
{
4040
"text": ":"
4141
}
4242
]
4343
}
4444

45-
null,
46-
^
45+
call(1, 2);
46+
^
4747
{
4848
"text": "",
49-
"position": 211,
49+
"position": 143,
5050
"kind": "Parameter",
5151
"whitespaceAfter": true,
5252
"displayParts": [
5353
{
5454
"text": "c",
5555
"span": {
56-
"start": 51,
56+
"start": 55,
5757
"length": 1
5858
},
59-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
59+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
6060
},
6161
{
6262
"text": ":"
6363
}
6464
]
6565
}
6666

67-
true,
68-
^
67+
new call(1);
68+
^
6969
{
7070
"text": "",
71-
"position": 221,
71+
"position": 156,
7272
"kind": "Parameter",
7373
"whitespaceAfter": true,
7474
"displayParts": [
7575
{
7676
"text": "d",
7777
"span": {
78-
"start": 64,
78+
"start": 81,
7979
"length": 1
8080
},
81-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
81+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
8282
},
8383
{
8484
"text": ":"
8585
}
8686
]
8787
}
8888

89-
false,
89+
foo(1)
9090
^
9191
{
9292
"text": "",
93-
"position": 231,
93+
"position": 326,
9494
"kind": "Parameter",
9595
"whitespaceAfter": true,
9696
"displayParts": [
9797
{
98-
"text": "e",
98+
"text": "w",
9999
"span": {
100-
"start": 80,
100+
"start": 181,
101101
"length": 1
102102
},
103-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
103+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
104104
},
105105
{
106106
"text": ":"
107107
}
108108
]
109109
}
110110

111-
Infinity,
111+
foo(1, 2)
112112
^
113113
{
114114
"text": "",
115-
"position": 242,
115+
"position": 333,
116116
"kind": "Parameter",
117117
"whitespaceAfter": true,
118118
"displayParts": [
119119
{
120-
"text": "f",
120+
"text": "a",
121121
"span": {
122-
"start": 96,
122+
"start": 219,
123123
"length": 1
124124
},
125-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
125+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
126126
},
127127
{
128128
"text": ":"
129129
}
130130
]
131131
}
132132

133-
-Infinity,
134-
^
133+
foo(1, 2)
134+
^
135135
{
136136
"text": "",
137-
"position": 256,
137+
"position": 336,
138138
"kind": "Parameter",
139139
"whitespaceAfter": true,
140140
"displayParts": [
141141
{
142-
"text": "g",
142+
"text": "b",
143143
"span": {
144-
"start": 111,
144+
"start": 230,
145145
"length": 1
146146
},
147-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
147+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
148148
},
149149
{
150150
"text": ":"
151151
}
152152
]
153153
}
154154

155-
NaN,
156-
^
155+
new Class(1)
156+
^
157157
{
158158
"text": "",
159-
"position": 271,
159+
"position": 475,
160160
"kind": "Parameter",
161161
"whitespaceAfter": true,
162162
"displayParts": [
163163
{
164-
"text": "h",
164+
"text": "a",
165165
"span": {
166-
"start": 126,
166+
"start": 369,
167167
"length": 1
168168
},
169-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
169+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
170170
},
171171
{
172172
"text": ":"
173173
}
174174
]
175175
}
176176

177-
/hello/g,
178-
^
177+
new Class(1, 2)
178+
^
179179
{
180180
"text": "",
181-
"position": 280,
181+
"position": 488,
182182
"kind": "Parameter",
183183
"whitespaceAfter": true,
184184
"displayParts": [
185185
{
186-
"text": "i",
186+
"text": "b",
187187
"span": {
188-
"start": 141,
188+
"start": 397,
189189
"length": 1
190190
},
191-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
191+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
192192
},
193193
{
194194
"text": ":"
195195
}
196196
]
197197
}
198198

199-
123n,
200-
^
199+
new Class(1, 2)
200+
^
201201
{
202202
"text": "",
203-
"position": 294,
203+
"position": 491,
204204
"kind": "Parameter",
205205
"whitespaceAfter": true,
206206
"displayParts": [
207207
{
208-
"text": "j",
208+
"text": "c",
209209
"span": {
210-
"start": 156,
210+
"start": 408,
211211
"length": 1
212212
},
213-
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
213+
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
214214
},
215215
{
216216
"text": ":"

0 commit comments

Comments
 (0)