Organize/consolidate inlay hint tests (#55332)

This commit is contained in:
Maria José Solano authored and GitHub committed 2023-08-14 14:21:00 -07:00
1 parent f5e73d7e60
commit 05cb53ec0b
175 files changed
+2239 -1827

No files matched your search

@@ -0,0 +1,80 @@
const f1: F1 = (a, b) => { }
^
{
"text": ": string",
"position": 58,
"kind": "Type",
"whitespaceBefore": true
}
const f1: F1 = (a, b) => { }
^
{
"text": ": number",
"position": 61,
"kind": "Type",
"whitespaceBefore": true
}
const f2: F1 = (a, b: number) => { }
^
{
"text": ": string",
"position": 87,
"kind": "Type",
"whitespaceBefore": true
}
foo1((a) => { })
^
{
"text": ": string",
"position": 157,
"kind": "Type",
"whitespaceBefore": true
}
foo2((a) => { })
^
{
"text": ": 2 | 3",
"position": 232,
"kind": "Type",
"whitespaceBefore": true
}
foo3(a => {
^
{
"text": ": (c: (d: 2 | 3) => void) => ...",
"position": 331,
"kind": "Type",
"whitespaceBefore": true
}
a(d => {})
^
{
"text": ": 2 | 3",
"position": 344,
"kind": "Type",
"whitespaceBefore": true
}
foo4(1, a => { })
^
{
"text": ": number",
"position": 409,
"kind": "Type",
"whitespaceBefore": true
}
const foo5: F2 = (a) => { }
^
{
"text": ": { a: number; b: string; }",
"position": 492,
"kind": "Type",
"whitespaceBefore": true
}
@@ -0,0 +1,17 @@
bar: function (x?): void {
^
{
"text": ": boolean",
"position": 87,
"kind": "Type",
"whitespaceBefore": true
}
set foo(value) { this.#value = value; }
^
{
"text": ": number",
"position": 250,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,18 +1,18 @@
"hello",
^
call(1);
^
{
"text": "",
"position": 183,
"position": 131,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 18,
"start": 22,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -20,21 +20,21 @@
]
}
undefined,
^
call(1, 2);
^
{
"text": "",
"position": 196,
"position": 140,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 33,
"start": 44,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -42,21 +42,21 @@
]
}
null,
^
call(1, 2);
^
{
"text": "",
"position": 211,
"position": 143,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 51,
"start": 55,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -64,21 +64,21 @@
]
}
true,
^
new call(1);
^
{
"text": "",
"position": 221,
"position": 156,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "d",
"span": {
"start": 64,
"start": 81,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -86,21 +86,21 @@
]
}
false,
foo(1)
^
{
"text": "",
"position": 231,
"position": 326,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "e",
"text": "w",
"span": {
"start": 80,
"start": 181,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -108,21 +108,21 @@
]
}
Infinity,
foo(1, 2)
^
{
"text": "",
"position": 242,
"position": 333,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "f",
"text": "a",
"span": {
"start": 96,
"start": 219,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -130,21 +130,21 @@
]
}
-Infinity,
^
foo(1, 2)
^
{
"text": "",
"position": 256,
"position": 336,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "g",
"text": "b",
"span": {
"start": 111,
"start": 230,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -152,21 +152,21 @@
]
}
NaN,
^
new Class(1)
^
{
"text": "",
"position": 271,
"position": 475,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "h",
"text": "a",
"span": {
"start": 126,
"start": 369,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -174,21 +174,21 @@
]
}
/hello/g,
^
new Class(1, 2)
^
{
"text": "",
"position": 280,
"position": 488,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "i",
"text": "b",
"span": {
"start": 141,
"start": 397,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -196,21 +196,21 @@
]
}
123n,
^
new Class(1, 2)
^
{
"text": "",
"position": 294,
"position": 491,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "j",
"text": "c",
"span": {
"start": 156,
"start": 408,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
},
{
"text": ":"
@@ -0,0 +1,461 @@
foo1(1, 2);
^
{
"text": "",
"position": 47,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 16,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
foo1(1, 2);
^
{
"text": "",
"position": 50,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 27,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
foo2(1, { c: 1 });
^
{
"text": "",
"position": 102,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 70,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
const C1 = class extends foo3(1) { }
^
{
"text": "",
"position": 180,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 130,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
class C2 extends foo3(1) { }
^
{
"text": "",
"position": 209,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 130,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
foo4(1, +1, -1, +"1");
^
{
"text": "",
"position": 282,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 230,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
foo4(1, +1, -1, +"1");
^
{
"text": "",
"position": 285,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 241,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
foo4(1, +1, -1, +"1");
^
{
"text": "",
"position": 289,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 252,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
foo4(1, +1, -1, +"1");
^
{
"text": "",
"position": 293,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "d",
"span": {
"start": 263,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
"hello",
^
{
"text": "",
"position": 484,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 319,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
undefined,
^
{
"text": "",
"position": 497,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 334,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
null,
^
{
"text": "",
"position": 512,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 352,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
true,
^
{
"text": "",
"position": 522,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "d",
"span": {
"start": 365,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
false,
^
{
"text": "",
"position": 532,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "e",
"span": {
"start": 381,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
Infinity,
^
{
"text": "",
"position": 543,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "f",
"span": {
"start": 397,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
-Infinity,
^
{
"text": "",
"position": 557,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "g",
"span": {
"start": 412,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
NaN,
^
{
"text": "",
"position": 572,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "h",
"span": {
"start": 427,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
/hello/g,
^
{
"text": "",
"position": 581,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "i",
"span": {
"start": 442,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
123n,
^
{
"text": "",
"position": 595,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "j",
"span": {
"start": 457,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
trace(`${1}`);
^
{
"text": "",
"position": 694,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "message",
"span": {
"start": 668,
"length": 7
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
trace(``);
^
{
"text": "",
"position": 709,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "message",
"span": {
"start": 668,
"length": 7
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNames.ts"
},
{
"text": ":"
}
]
}
@@ -12,7 +12,7 @@ function c2 () { foo2(1, 2); }
"start": 55,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
},
{
"text": ":"
@@ -34,7 +34,7 @@ function c2 () { foo2(1, 2); }
"start": 66,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
},
{
"text": ":"
@@ -56,7 +56,7 @@ function c3 () { foo3(1, 2); }
"start": 95,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
},
{
"text": ":"
@@ -78,7 +78,7 @@ function c3 () { foo3(1, 2); }
"start": 106,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
},
{
"text": ":"
@@ -100,7 +100,7 @@ function c4 () { foo4(1, 2); }
"start": 135,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
},
{
"text": ":"
@@ -122,7 +122,7 @@ function c4 () { foo4(1, 2); }
"start": 146,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
},
{
"text": ":"
@@ -12,7 +12,7 @@ foo2(1, 2);
"start": 55,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
},
{
"text": ":"
@@ -34,7 +34,7 @@ foo2(1, 2);
"start": 66,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
},
{
"text": ":"
@@ -56,7 +56,7 @@ foo3(1, 2);
"start": 95,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
},
{
"text": ":"
@@ -78,7 +78,7 @@ foo3(1, 2);
"start": 106,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
},
{
"text": ":"
@@ -100,7 +100,7 @@ foo4(1, 2);
"start": 135,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
},
{
"text": ":"
@@ -122,7 +122,7 @@ foo4(1, 2);
"start": 146,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
},
{
"text": ":"
@@ -1,27 +1,40 @@
function foo (aParameter: number, bParameter: number, cParameter: number) { }
^
fn(/* nobody knows exactly what this param is */ 42);
^
{
"text": ": void",
"position": 73,
"kind": "Type",
"whitespaceBefore": true
"text": "",
"position": 76,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "x",
"span": {
"start": 12,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
},
{
"text": ":"
}
]
}
2,
^
{
"text": "",
"position": 134,
"position": 215,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "bParameter",
"span": {
"start": 34,
"start": 115,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
},
{
"text": ":"
@@ -33,17 +46,17 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
^
{
"text": "",
"position": 338,
"position": 419,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "cParameter",
"span": {
"start": 54,
"start": 135,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
},
{
"text": ":"
@@ -55,17 +68,17 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
^
{
"text": "",
"position": 373,
"position": 454,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "aParameter",
"span": {
"start": 14,
"start": 95,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
},
{
"text": ":"
@@ -77,17 +90,17 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
^
{
"text": "",
"position": 380,
"position": 461,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "bParameter",
"span": {
"start": 34,
"start": 115,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
},
{
"text": ":"
@@ -99,17 +112,17 @@ function foo (aParameter: number, bParameter: number, cParameter: number) { }
^
{
"text": "",
"position": 440,
"position": 521,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "cParameter",
"span": {
"start": 54,
"start": 135,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
},
{
"text": ":"
@@ -1,40 +1,18 @@
foo(1, '', false, 1, 2)
^
foo1(1, 1, 1, 1);
^
{
"text": "",
"position": 161,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "f",
"span": {
"start": 70,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
},
{
"text": ":"
}
]
}
foo(1, '', false, 1, 2)
^
{
"text": "",
"position": 164,
"position": 49,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 10,
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
},
{
"text": ":"
@@ -42,21 +20,87 @@ foo(1, '', false, 1, 2)
]
}
foo(1, '', false, 1, 2)
foo1(1, 1, 1, 1);
^
{
"text": "",
"position": 52,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "...b",
"span": {
"start": 28,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
},
{
"text": ":"
}
]
}
foo2(1, 2, 3)
^
{
"text": "",
"position": 153,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 120,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
},
{
"text": ":"
}
]
}
foo2(1, 2, 3)
^
{
"text": "",
"position": 156,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 76,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
},
{
"text": ":"
}
]
}
foo2(1, 2, 3)
^
{
"text": "",
"position": 168,
"position": 159,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 21,
"start": 87,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
},
{
"text": ":"
@@ -64,65 +108,21 @@ foo(1, '', false, 1, 2)
]
}
foo(1, '', false, 1, 2)
^
{
"text": "",
"position": 175,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "...c",
"span": {
"start": 36,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
},
{
"text": ":"
}
]
}
foo1(1, "", "")
foo3(1, 2, 3)
^
{
"text": "",
"position": 186,
"position": 247,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "f1",
"text": "c",
"span": {
"start": 120,
"length": 2
"start": 214,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
},
{
"text": ":"
}
]
}
foo1(1, "", "")
^
{
"text": "",
"position": 189,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "...args",
"span": {
"start": 135,
"length": 4
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
},
{
"text": ":"
@@ -0,0 +1,241 @@
foo(...x, 3);
^
{
"text": "",
"position": 113,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(...x, 3);
^
{
"text": "",
"position": 119,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 37,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(...x, 1, 2, 3);
^
{
"text": "",
"position": 165,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(...x, 1, 2, 3);
^
{
"text": "",
"position": 168,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 25,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(...x, 1, 2, 3);
^
{
"text": "",
"position": 171,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 37,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(1, ...x);
^
{
"text": "",
"position": 226,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(1, ...x);
^
{
"text": "",
"position": 229,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 25,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(...x, 3);
^
{
"text": "",
"position": 287,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(...x, 3);
^
{
"text": "",
"position": 293,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 25,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(...x, 3);
^
{
"text": "",
"position": 347,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
foo(...x, 3);
^
{
"text": "",
"position": 353,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 37,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters2.ts"
},
{
"text": ":"
}
]
}
@@ -0,0 +1,205 @@
function numberLiteral() { return 1; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "number"
}
],
"position": 52,
"kind": "Type",
"whitespaceBefore": true
}
function stringLiteral() { return "foo"; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "string"
}
],
"position": 91,
"kind": "Type",
"whitespaceBefore": true
}
function nothing() { }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "void"
}
],
"position": 128,
"kind": "Type",
"whitespaceBefore": true
}
function closure() { return () => 1; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "("
},
{
"text": ")"
},
{
"text": " => "
},
{
"text": "number"
}
],
"position": 151,
"kind": "Type",
"whitespaceBefore": true
}
function closure() { return () => 1; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "number"
}
],
"position": 163,
"kind": "Type",
"whitespaceBefore": true
}
function fooClosure() { return (foo: Foo) => foo.bar; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "("
},
{
"text": ")"
},
{
"text": " => "
},
{
"text": "number"
}
],
"position": 193,
"kind": "Type",
"whitespaceBefore": true
}
function fooClosure() { return (foo: Foo) => foo.bar; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "number"
}
],
"position": 213,
"kind": "Type",
"whitespaceBefore": true
}
function returnFoo(foo: Foo) { return foo; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "Foo",
"span": {
"start": 5,
"length": 3
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveReturnType.ts"
}
],
"position": 256,
"kind": "Type",
"whitespaceBefore": true
}
function returnMaybeFoo(foo: Foo) { if (Math.random()) return foo; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "Foo",
"span": {
"start": 5,
"length": 3
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveReturnType.ts"
}
],
"position": 306,
"kind": "Type",
"whitespaceBefore": true
}
function returnFoos(foo: Foo) { return [foo, foo]; }
^
{
"text": "",
"displayParts": [
{
"text": ": "
},
{
"text": "Foo",
"span": {
"start": 5,
"length": 3
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveReturnType.ts"
},
{
"text": "[]"
}
],
"position": 371,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,18 +1,18 @@
call(1);
foo1(1)(2);
^
{
"text": "",
"position": 131,
"position": 89,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 22,
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveWithClosures.ts"
},
{
"text": ":"
@@ -20,21 +20,21 @@ call(1);
]
}
call(1, 2);
^
foo1(1)(2);
^
{
"text": "",
"position": 140,
"position": 92,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 44,
"start": 39,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveWithClosures.ts"
},
{
"text": ":"
@@ -42,21 +42,21 @@ call(1, 2);
]
}
call(1, 2);
^
return a(1) + 2
^
{
"text": "",
"position": 143,
"position": 151,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"text": "b",
"span": {
"start": 55,
"start": 114,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveWithClosures.ts"
},
{
"text": ":"
@@ -64,21 +64,21 @@ call(1, 2);
]
}
new call(1);
^
foo2((c: number) => c + 1);
^
{
"text": "",
"position": 156,
"position": 165,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "d",
"text": "a",
"span": {
"start": 81,
"start": 110,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
"file": "/tests/cases/fourslash/inlayHintsInteractiveWithClosures.ts"
},
{
"text": ":"
@@ -12,7 +12,7 @@ foo(1);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
},
{
"text": ":"
@@ -34,7 +34,7 @@ foo('');
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
},
{
"text": ":"
@@ -56,7 +56,7 @@ foo(true);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
},
{
"text": ":"
@@ -78,7 +78,7 @@ foo((1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
},
{
"text": ":"
@@ -100,7 +100,7 @@ foo(foo(1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
},
{
"text": ":"
@@ -12,7 +12,7 @@ foo(1);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -34,7 +34,7 @@ foo('');
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -56,7 +56,7 @@ foo(true);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -78,7 +78,7 @@ foo(() => 1);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -100,7 +100,7 @@ foo(function () { return 1 });
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -122,7 +122,7 @@ foo({});
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -144,7 +144,7 @@ foo({ a: 1 });
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -166,7 +166,7 @@ foo([]);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -188,7 +188,7 @@ foo([1]);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -210,7 +210,7 @@ foo(foo);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -232,7 +232,7 @@ foo((1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -254,7 +254,7 @@ foo(foo(1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -276,7 +276,7 @@ foo(foo(1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
},
{
"text": ":"
@@ -0,0 +1,89 @@
call(1);
^
{
"text": "a:",
"position": 131,
"kind": "Parameter",
"whitespaceAfter": true
}
call(1, 2);
^
{
"text": "b:",
"position": 140,
"kind": "Parameter",
"whitespaceAfter": true
}
call(1, 2);
^
{
"text": "c:",
"position": 143,
"kind": "Parameter",
"whitespaceAfter": true
}
new call(1);
^
{
"text": "d:",
"position": 156,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(1)
^
{
"text": "w:",
"position": 326,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(1, 2)
^
{
"text": "a:",
"position": 333,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(1, 2)
^
{
"text": "b:",
"position": 336,
"kind": "Parameter",
"whitespaceAfter": true
}
new Class(1)
^
{
"text": "a:",
"position": 475,
"kind": "Parameter",
"whitespaceAfter": true
}
new Class(1, 2)
^
{
"text": "b:",
"position": 488,
"kind": "Parameter",
"whitespaceAfter": true
}
new Class(1, 2)
^
{
"text": "c:",
"position": 491,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -0,0 +1,188 @@
foo1(1, 2);
^
{
"text": "a:",
"position": 47,
"kind": "Parameter",
"whitespaceAfter": true
}
foo1(1, 2);
^
{
"text": "b:",
"position": 50,
"kind": "Parameter",
"whitespaceAfter": true
}
foo2(1, { c: 1 });
^
{
"text": "a:",
"position": 102,
"kind": "Parameter",
"whitespaceAfter": true
}
const C1 = class extends foo3(1) { }
^
{
"text": "a:",
"position": 180,
"kind": "Parameter",
"whitespaceAfter": true
}
class C2 extends foo3(1) { }
^
{
"text": "a:",
"position": 209,
"kind": "Parameter",
"whitespaceAfter": true
}
foo4(1, +1, -1, +"1");
^
{
"text": "a:",
"position": 282,
"kind": "Parameter",
"whitespaceAfter": true
}
foo4(1, +1, -1, +"1");
^
{
"text": "b:",
"position": 285,
"kind": "Parameter",
"whitespaceAfter": true
}
foo4(1, +1, -1, +"1");
^
{
"text": "c:",
"position": 289,
"kind": "Parameter",
"whitespaceAfter": true
}
foo4(1, +1, -1, +"1");
^
{
"text": "d:",
"position": 293,
"kind": "Parameter",
"whitespaceAfter": true
}
"hello",
^
{
"text": "a:",
"position": 484,
"kind": "Parameter",
"whitespaceAfter": true
}
undefined,
^
{
"text": "b:",
"position": 497,
"kind": "Parameter",
"whitespaceAfter": true
}
null,
^
{
"text": "c:",
"position": 512,
"kind": "Parameter",
"whitespaceAfter": true
}
true,
^
{
"text": "d:",
"position": 522,
"kind": "Parameter",
"whitespaceAfter": true
}
false,
^
{
"text": "e:",
"position": 532,
"kind": "Parameter",
"whitespaceAfter": true
}
Infinity,
^
{
"text": "f:",
"position": 543,
"kind": "Parameter",
"whitespaceAfter": true
}
-Infinity,
^
{
"text": "g:",
"position": 557,
"kind": "Parameter",
"whitespaceAfter": true
}
NaN,
^
{
"text": "h:",
"position": 572,
"kind": "Parameter",
"whitespaceAfter": true
}
/hello/g,
^
{
"text": "i:",
"position": 581,
"kind": "Parameter",
"whitespaceAfter": true
}
123n,
^
{
"text": "j:",
"position": 595,
"kind": "Parameter",
"whitespaceAfter": true
}
trace(`${1}`);
^
{
"text": "message:",
"position": 694,
"kind": "Parameter",
"whitespaceAfter": true
}
trace(``);
^
{
"text": "message:",
"position": 709,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -0,0 +1,53 @@
function c2 () { foo2(1, 2); }
^
{
"text": "c:",
"position": 293,
"kind": "Parameter",
"whitespaceAfter": true
}
function c2 () { foo2(1, 2); }
^
{
"text": "d:",
"position": 296,
"kind": "Parameter",
"whitespaceAfter": true
}
function c3 () { foo3(1, 2); }
^
{
"text": "e:",
"position": 324,
"kind": "Parameter",
"whitespaceAfter": true
}
function c3 () { foo3(1, 2); }
^
{
"text": "f:",
"position": 327,
"kind": "Parameter",
"whitespaceAfter": true
}
function c4 () { foo4(1, 2); }
^
{
"text": "g:",
"position": 355,
"kind": "Parameter",
"whitespaceAfter": true
}
function c4 () { foo4(1, 2); }
^
{
"text": "h:",
"position": 358,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -0,0 +1,53 @@
foo2(1, 2);
^
{
"text": "c:",
"position": 257,
"kind": "Parameter",
"whitespaceAfter": true
}
foo2(1, 2);
^
{
"text": "d:",
"position": 260,
"kind": "Parameter",
"whitespaceAfter": true
}
foo3(1, 2);
^
{
"text": "e:",
"position": 269,
"kind": "Parameter",
"whitespaceAfter": true
}
foo3(1, 2);
^
{
"text": "f:",
"position": 272,
"kind": "Parameter",
"whitespaceAfter": true
}
foo4(1, 2);
^
{
"text": "g:",
"position": 281,
"kind": "Parameter",
"whitespaceAfter": true
}
foo4(1, 2);
^
{
"text": "h:",
"position": 284,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -0,0 +1,53 @@
foo1(1, 1, 1, 1);
^
{
"text": "a:",
"position": 49,
"kind": "Parameter",
"whitespaceAfter": true
}
foo1(1, 1, 1, 1);
^
{
"text": "...b:",
"position": 52,
"kind": "Parameter",
"whitespaceAfter": true
}
foo2(1, 2, 3)
^
{
"text": "c:",
"position": 153,
"kind": "Parameter",
"whitespaceAfter": true
}
foo2(1, 2, 3)
^
{
"text": "a:",
"position": 156,
"kind": "Parameter",
"whitespaceAfter": true
}
foo2(1, 2, 3)
^
{
"text": "b:",
"position": 159,
"kind": "Parameter",
"whitespaceAfter": true
}
foo3(1, 2, 3)
^
{
"text": "c:",
"position": 247,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -0,0 +1,98 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 113,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "c:",
"position": 119,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 1, 2, 3);
^
{
"text": "a:",
"position": 165,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 1, 2, 3);
^
{
"text": "b:",
"position": 168,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 1, 2, 3);
^
{
"text": "c:",
"position": 171,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(1, ...x);
^
{
"text": "a:",
"position": 226,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(1, ...x);
^
{
"text": "b:",
"position": 229,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "a:",
"position": 287,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "b:",
"position": 293,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "a:",
"position": 347,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "c:",
"position": 353,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -0,0 +1,44 @@
function foo1 () {
^
{
"text": ": number",
"position": 16,
"kind": "Type",
"whitespaceBefore": true
}
foo() {
^
{
"text": ": number",
"position": 95,
"kind": "Type",
"whitespaceBefore": true
}
const a = () => 1
^
{
"text": ": number",
"position": 135,
"kind": "Type",
"whitespaceBefore": true
}
const b = function () { return 1 }
^
{
"text": ": number",
"position": 162,
"kind": "Type",
"whitespaceBefore": true
}
const c = (b) => 1
^
{
"text": ": number",
"position": 189,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,43 +0,0 @@
foo(1, 2);
^
{
"text": "",
"position": 43,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork1.ts"
},
{
"text": ":"
}
]
}
foo(1, 2);
^
{
"text": "",
"position": 46,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 25,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork1.ts"
},
{
"text": ":"
}
]
}
@@ -1,43 +0,0 @@
foo(1)(2);
^
{
"text": "",
"position": 87,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork11.ts"
},
{
"text": ":"
}
]
}
foo(1)(2);
^
{
"text": "",
"position": 90,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 38,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork11.ts"
},
{
"text": ":"
}
]
}
@@ -1,43 +0,0 @@
return a(1) + 2
^
{
"text": "",
"position": 54,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 17,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork12.ts"
},
{
"text": ":"
}
]
}
foo((c: number) => c + 1);
^
{
"text": "",
"position": 67,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork12.ts"
},
{
"text": ":"
}
]
}
@@ -1,21 +0,0 @@
foo(a, 2);
^
{
"text": "",
"position": 66,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 25,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork13.ts"
},
{
"text": ":"
}
]
}
@@ -1,21 +0,0 @@
foo(1, { c: 1 });
^
{
"text": "",
"position": 44,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork2.ts"
},
{
"text": ":"
}
]
}
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1,17 +0,0 @@
const f: F = (a, b) => { }
^
{
"text": ": string",
"position": 55,
"kind": "Type",
"whitespaceBefore": true
}
const f: F = (a, b) => { }
^
{
"text": ": number",
"position": 58,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
foo((a) => { })
^
{
"text": ": string",
"position": 48,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
foo((a) => { })
^
{
"text": ": 2 | 3",
"position": 63,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,17 +0,0 @@
foo(a => {
^
{
"text": ": (c: (d: 2 | 3) => void) => ...",
"position": 87,
"kind": "Type",
"whitespaceBefore": true
}
a(d => {})
^
{
"text": ": 2 | 3",
"position": 100,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
const f: F = (a, b: number) => { }
^
{
"text": ": string",
"position": 55,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,35 +0,0 @@
foo(a => {
^
{
"text": "a:",
"position": 86,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(a => {
^
{
"text": ": (c: (d: 2 | 3) => void) => ...",
"position": 87,
"kind": "Type",
"whitespaceBefore": true
}
a(d => {})
^
{
"text": "c:",
"position": 99,
"kind": "Parameter",
"whitespaceAfter": true
}
a(d => {})
^
{
"text": ": 2 | 3",
"position": 100,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,43 +0,0 @@
foo(1, 1, 1, 1);
^
{
"text": "",
"position": 48,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork3.ts"
},
{
"text": ":"
}
]
}
foo(1, 1, 1, 1);
^
{
"text": "",
"position": 51,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "...b",
"span": {
"start": 28,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork3.ts"
},
{
"text": ":"
}
]
}
@@ -1,8 +0,0 @@
f(1, a => { })
^
{
"text": ": number",
"position": 48,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
const f: F = (a) => { }
^
{
"text": ": { a: number; b: string; }",
"position": 69,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,43 +0,0 @@
foo(a, 2);
^
{
"text": "",
"position": 63,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork36.ts"
},
{
"text": ":"
}
]
}
foo(a, 2);
^
{
"text": "",
"position": 66,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 25,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork36.ts"
},
{
"text": ":"
}
]
}
@@ -1,8 +0,0 @@
function foo () {
^
{
"text": ": number",
"position": 15,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1,65 +0,0 @@
foo(1)
^
{
"text": "",
"position": 166,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "w",
"span": {
"start": 21,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork4.ts"
},
{
"text": ":"
}
]
}
foo(1, 2)
^
{
"text": "",
"position": 173,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 59,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork4.ts"
},
{
"text": ":"
}
]
}
foo(1, 2)
^
{
"text": "",
"position": 176,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 70,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork4.ts"
},
{
"text": ":"
}
]
}
@@ -1,8 +0,0 @@
foo() {
^
{
"text": ": number",
"position": 19,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
const a = () => 1
^
{
"text": ": number",
"position": 12,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
const a = function () { return 1}
^
{
"text": ": number",
"position": 21,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
const a = (b) => 1
^
{
"text": ": number",
"position": 13,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1,8 +0,0 @@
const x = foo(1)
^
{
"text": ": 1",
"position": 55,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1,65 +0,0 @@
foo(1, 2, 3)
^
{
"text": "",
"position": 87,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 56,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork5.ts"
},
{
"text": ":"
}
]
}
foo(1, 2, 3)
^
{
"text": "",
"position": 90,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork5.ts"
},
{
"text": ":"
}
]
}
foo(1, 2, 3)
^
{
"text": "",
"position": 93,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 24,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork5.ts"
},
{
"text": ":"
}
]
}
@@ -1,21 +0,0 @@
fn(/* nobody knows exactly what this param is */ 42);
^
{
"text": "",
"position": 76,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "x",
"span": {
"start": 12,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork53.ts"
},
{
"text": ":"
}
]
}
@@ -1,8 +0,0 @@
get foo() { return 1; }
^
{
"text": ": number",
"position": 25,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
set foo(value) { this.#value = value; }
^
{
"text": ": number",
"position": 91,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1,21 +0,0 @@
foo(1, 2, 3)
^
{
"text": "",
"position": 81,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 50,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork6.ts"
},
{
"text": ":"
}
]
}
@@ -1,8 +0,0 @@
set foo(value) { this.#value = value; }
^
{
"text": ": number",
"position": 83,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1,43 +0,0 @@
trace(`${1}`);
^
{
"text": "",
"position": 41,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "message",
"span": {
"start": 15,
"length": 7
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork62.ts"
},
{
"text": ":"
}
]
}
trace(``);
^
{
"text": "",
"position": 56,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "message",
"span": {
"start": 15,
"length": 7
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork62.ts"
},
{
"text": ":"
}
]
}
@@ -1,87 +0,0 @@
foo(1, +1, -1, +"1");
^
{
"text": "",
"position": 64,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork63.ts"
},
{
"text": ":"
}
]
}
foo(1, +1, -1, +"1");
^
{
"text": "",
"position": 67,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 24,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork63.ts"
},
{
"text": ":"
}
]
}
foo(1, +1, -1, +"1");
^
{
"text": "",
"position": 71,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 35,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork63.ts"
},
{
"text": ":"
}
]
}
foo(1, +1, -1, +"1");
^
{
"text": "",
"position": 75,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "d",
"span": {
"start": 46,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork63.ts"
},
{
"text": ":"
}
]
}
@@ -1,8 +0,0 @@
const f: F = (a, b = 1) => { }
^
{
"text": ": string",
"position": 55,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1,8 +0,0 @@
bar: function (x?): void {
^
{
"text": ": boolean",
"position": 87,
"kind": "Type",
"whitespaceBefore": true
}
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1,43 +0,0 @@
const C1 = class extends foo(1) { }
^
{
"text": "",
"position": 63,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork68.ts"
},
{
"text": ":"
}
]
}
class C2 extends foo(1) { }
^
{
"text": "",
"position": 91,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 13,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork68.ts"
},
{
"text": ":"
}
]
}
@@ -1 +0,0 @@
=== No inlay hints ===
@@ -1,65 +0,0 @@
call(1);
^
{
"text": "",
"position": 105,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 22,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork7.ts"
},
{
"text": ":"
}
]
}
call(1, 2);
^
{
"text": "",
"position": 114,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 44,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork7.ts"
},
{
"text": ":"
}
]
}
call(1, 2);
^
{
"text": "",
"position": 117,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 55,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork7.ts"
},
{
"text": ":"
}
]
}
@@ -1,17 +0,0 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 100,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "c:",
"position": 106,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -1,17 +0,0 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 120,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "d:",
"position": 126,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -1,17 +0,0 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 101,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "b:",
"position": 107,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -1,17 +0,0 @@
foo(1, ...x);
^
{
"text": "a:",
"position": 101,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(1, ...x);
^
{
"text": "b:",
"position": 104,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -1,17 +0,0 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 112,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "c:",
"position": 118,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -1,26 +0,0 @@
foo(...x, 1, 2, 3);
^
{
"text": "a:",
"position": 92,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 1, 2, 3);
^
{
"text": "b:",
"position": 95,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 1, 2, 3);
^
{
"text": "c:",
"position": 98,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -1,8 +0,0 @@
foo(...x, 1);
^
{
"text": "d:",
"position": 152,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -1,65 +0,0 @@
new Class(1)
^
{
"text": "",
"position": 136,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 30,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork8.ts"
},
{
"text": ":"
}
]
}
new Class(1, 2)
^
{
"text": "",
"position": 149,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 58,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork8.ts"
},
{
"text": ":"
}
]
}
new Class(1, 2)
^
{
"text": "",
"position": 152,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 69,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork8.ts"
},
{
"text": ":"
}
]
}
@@ -1,8 +1,8 @@
const a = () => 123;
^
const m = () => 123;
^
{
"text": ": () => number",
"position": 7,
"position": 331,
"kind": "Type",
"whitespaceBefore": true
}
@@ -23,4 +23,13 @@ const b = array;
"position": 128,
"kind": "Type",
"whitespaceBefore": true
}
const x = foo(1)
^
{
"text": ": 1",
"position": 244,
"kind": "Type",
"whitespaceBefore": true
}
@@ -0,0 +1,35 @@
foo1(1)(2);
^
{
"text": "a:",
"position": 89,
"kind": "Parameter",
"whitespaceAfter": true
}
foo1(1)(2);
^
{
"text": "b:",
"position": 92,
"kind": "Parameter",
"whitespaceAfter": true
}
return a(1) + 2
^
{
"text": "b:",
"position": 151,
"kind": "Parameter",
"whitespaceAfter": true
}
foo2((c: number) => c + 1);
^
{
"text": "a:",
"position": 165,
"kind": "Parameter",
"whitespaceAfter": true
}
@@ -0,0 +1,29 @@
/// <reference path="fourslash.ts" />
//// type F1 = (a: string, b: number) => void
//// const f1: F1 = (a, b) => { }
//// const f2: F1 = (a, b: number) => { }
//// function foo1 (cb: (a: string) => void) {}
//// foo1((a) => { })
//// function foo2 (cb: (a: Exclude<1 | 2 | 3, 1>) => void) {}
//// foo2((a) => { })
//// function foo3 (a: (b: (c: (d: Exclude<1 | 2 | 3, 1>) => void) => void) => void) {}
//// foo3(a => {
//// a(d => {})
//// })
//// function foo4<T>(v: T, a: (v: T) => void) {}
//// foo4(1, a => { })
//// type F2 = (a: {
//// a: number
//// b: string
//// }) => void
//// const foo5: F2 = (a) => { }
verify.baselineInlayHints(undefined, {
includeInlayFunctionParameterTypeHints: true
});
@@ -10,6 +10,12 @@
//// }
////}
////class Foo {
//// #value = 0;
//// get foo(): number { return this.#value; }
//// set foo(value) { this.#value = value; }
////}
verify.baselineInlayHints(undefined, {
includeInlayFunctionParameterTypeHints: true
});
@@ -0,0 +1,30 @@
/// <reference path="fourslash.ts" />
//// interface Call {
//// (a: number): void
//// (b: number, c: number): void
//// new (d: number): Call
//// }
//// declare const call: Call;
//// call(1);
//// call(1, 2);
//// new call(1);
//// declare function foo(w: number): void
//// declare function foo(a: number, b: number): void;
//// declare function foo(a: number | undefined, b: number | undefined): void;
//// foo(1)
//// foo(1, 2)
//// class Class {
//// constructor(a: number);
//// constructor(b: number, c: number);
//// constructor(b: number, c?: number) { }
//// }
//// new Class(1)
//// new Class(1, 2)
verify.baselineInlayHints(undefined, {
includeInlayParameterNameHints: "literals",
interactiveInlayHints: true
});
@@ -0,0 +1,49 @@
/// <reference path="fourslash.ts" />
//// function foo1 (a: number, b: number) {}
//// foo1(1, 2);
//// function foo2 (a: number, { c }: any) {}
//// foo2(1, { c: 1 });
////const foo3 = (a = 1) => class { }
////const C1 = class extends foo3(1) { }
////class C2 extends foo3(1) { }
////function foo4(a: number, b: number, c: number, d: number) {}
////foo4(1, +1, -1, +"1");
////function foo5(
//// a: string,
//// b: undefined,
//// c: null,
//// d: boolean,
//// e: boolean,
//// f: number,
//// g: number,
//// h: number,
//// i: RegExp,
//// j: bigint,
////) {
////}
////foo5(
//// "hello",
//// undefined,
//// null,
//// true,
//// false,
//// Infinity,
//// -Infinity,
//// NaN,
//// /hello/g,
//// 123n,
////);
//// declare const unknownCall: any;
//// unknownCall();
////function trace(message: string) {}
////trace(`${1}`);
////trace(``);
verify.baselineInlayHints(undefined, { includeInlayParameterNameHints: "literals", interactiveInlayHints: true });
@@ -1,5 +1,8 @@
/// <reference path="fourslash.ts" />
//// const fn = (x: any) => { }
//// fn(/* nobody knows exactly what this param is */ 42);
//// function foo (aParameter: number, bParameter: number, cParameter: number) { }
//// foo(
@@ -35,6 +38,5 @@
verify.baselineInlayHints(undefined, {
includeInlayParameterNameHints: "literals",
includeInlayFunctionLikeReturnTypeHints: true,
interactiveInlayHints: true
});
@@ -0,0 +1,14 @@
/// <reference path="fourslash.ts" />
//// function foo1(a: number, ...b: number[]) {}
//// foo1(1, 1, 1, 1);
//// type Args2 = [a: number, b: number]
//// declare function foo2(c: number, ...args: Args2);
//// foo2(1, 2, 3)
//// type Args3 = [number, number]
//// declare function foo3(c: number, ...args: Args3);
//// foo3(1, 2, 3)
verify.baselineInlayHints(undefined, { includeInlayParameterNameHints: "literals", interactiveInlayHints: true });
Loaded 100 of 175 files, more files were not shown because too many files have changed in this diff. Show more