Skip to content

Commit fe2ba1d

Browse files
Add inlay hints test for rest tuple tail
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <[email protected]>
1 parent 02440d1 commit fe2ba1d

File tree

2 files changed

+71
-0
lines changed

2 files changed

+71
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// === Inlay Hints ===
2+
test(10, 'a', 'b', 'c')
3+
^
4+
{
5+
"text": "first:",
6+
"position": 83,
7+
"kind": "Parameter",
8+
"whitespaceAfter": true
9+
}
10+
11+
test(10, 'a', 'b', 'c')
12+
^
13+
{
14+
"text": "...middle:",
15+
"position": 87,
16+
"kind": "Parameter",
17+
"whitespaceAfter": true
18+
}
19+
20+
test(10, 'a', 'b', 'c')
21+
^
22+
{
23+
"text": "...middle:",
24+
"position": 92,
25+
"kind": "Parameter",
26+
"whitespaceAfter": true
27+
}
28+
29+
test(10, 'a', 'b', 'c')
30+
^
31+
{
32+
"text": "last:",
33+
"position": 97,
34+
"kind": "Parameter",
35+
"whitespaceAfter": true
36+
}
37+
38+
test(10, 'a', 'c')
39+
^
40+
{
41+
"text": "first:",
42+
"position": 107,
43+
"kind": "Parameter",
44+
"whitespaceAfter": true
45+
}
46+
47+
test(10, 'a', 'c')
48+
^
49+
{
50+
"text": "...middle:",
51+
"position": 111,
52+
"kind": "Parameter",
53+
"whitespaceAfter": true
54+
}
55+
56+
test(10, 'a', 'c')
57+
^
58+
{
59+
"text": "last:",
60+
"position": 116,
61+
"kind": "Parameter",
62+
"whitespaceAfter": true
63+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//// function test(...rest: [first: number, ...middle: string[], last: string]) {}
2+
//// test(10, 'a', 'b', 'c')
3+
//// test(10, 'a', 'c')
4+
5+
verify.baselineInlayHints(undefined, {
6+
includeInlayParameterNameHints: "all",
7+
includeInlayFunctionParameterTypeHints: true,
8+
});

0 commit comments

Comments
 (0)