Revert "Organize/consolidate inlay hint tests (#55332)"

This reverts commit 05cb53ec0b.
This commit is contained in:
Maria José Solano 2023-08-14 15:01:54 -07:00 коммит произвёл GitHub
Родитель 05cb53ec0b
Коммит 3a59243531
175 изменённых файлов: 1843 добавлений и 2255 удалений

Просмотреть файл

@ -1,80 +0,0 @@
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
}

Просмотреть файл

@ -1,17 +0,0 @@
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,461 +0,0 @@
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": ":"
}
]
}

Просмотреть файл

@ -1,241 +0,0 @@
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": ":"
}
]
}

Просмотреть файл

@ -1,205 +0,0 @@
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,89 +0,0 @@
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
}

Просмотреть файл

@ -1,188 +0,0 @@
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
}

Просмотреть файл

@ -1,53 +0,0 @@
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
}

Просмотреть файл

@ -1,53 +0,0 @@
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
}

Просмотреть файл

@ -1,53 +0,0 @@
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
}

Просмотреть файл

@ -1,98 +0,0 @@
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
}

Просмотреть файл

@ -1,44 +0,0 @@
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
}

Просмотреть файл

@ -0,0 +1,43 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,43 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,43 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,21 @@
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,8 +1,8 @@
const m = () => 123;
^
const a = () => 123;
^
{
"text": ": () => number",
"position": 331,
"position": 7,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,21 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1,17 @@
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
}

Просмотреть файл

@ -0,0 +1,8 @@
foo((a) => { })
^
{
"text": ": string",
"position": 48,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,8 @@
foo((a) => { })
^
{
"text": ": 2 | 3",
"position": 63,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,17 @@
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
}

Просмотреть файл

@ -0,0 +1,8 @@
const f: F = (a, b: number) => { }
^
{
"text": ": string",
"position": 55,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,35 @@
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
}

Просмотреть файл

@ -0,0 +1,43 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,8 @@
f(1, a => { })
^
{
"text": ": number",
"position": 48,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,8 @@
const f: F = (a) => { }
^
{
"text": ": { a: number; b: string; }",
"position": 69,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -12,7 +12,7 @@ function c2 () { foo2(1, 2); }
"start": 55,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
},
{
"text": ":"
@ -34,7 +34,7 @@ function c2 () { foo2(1, 2); }
"start": 66,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
},
{
"text": ":"
@ -56,7 +56,7 @@ function c3 () { foo3(1, 2); }
"start": 95,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
},
{
"text": ":"
@ -78,7 +78,7 @@ function c3 () { foo3(1, 2); }
"start": 106,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
},
{
"text": ":"
@ -100,7 +100,7 @@ function c4 () { foo4(1, 2); }
"start": 135,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
},
{
"text": ":"
@ -122,7 +122,7 @@ function c4 () { foo4(1, 2); }
"start": 146,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork32.ts"
},
{
"text": ":"

Просмотреть файл

@ -12,7 +12,7 @@ foo2(1, 2);
"start": 55,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
},
{
"text": ":"
@ -34,7 +34,7 @@ foo2(1, 2);
"start": 66,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
},
{
"text": ":"
@ -56,7 +56,7 @@ foo3(1, 2);
"start": 95,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
},
{
"text": ":"
@ -78,7 +78,7 @@ foo3(1, 2);
"start": 106,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
},
{
"text": ":"
@ -100,7 +100,7 @@ foo4(1, 2);
"start": 135,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
},
{
"text": ":"
@ -122,7 +122,7 @@ foo4(1, 2);
"start": 146,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesInSpan2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork33.ts"
},
{
"text": ":"

Просмотреть файл

@ -12,7 +12,7 @@ foo(1);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
},
{
"text": ":"
@ -34,7 +34,7 @@ foo('');
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
},
{
"text": ":"
@ -56,7 +56,7 @@ foo(true);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
},
{
"text": ":"
@ -78,7 +78,7 @@ foo((1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
},
{
"text": ":"
@ -100,7 +100,7 @@ foo(foo(1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork34.ts"
},
{
"text": ":"

Просмотреть файл

@ -12,7 +12,7 @@ foo(1);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -34,7 +34,7 @@ foo('');
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -56,7 +56,7 @@ foo(true);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -78,7 +78,7 @@ foo(() => 1);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -100,7 +100,7 @@ foo(function () { return 1 });
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -122,7 +122,7 @@ foo({});
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -144,7 +144,7 @@ foo({ a: 1 });
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -166,7 +166,7 @@ foo([]);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -188,7 +188,7 @@ foo([1]);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -210,7 +210,7 @@ foo(foo);
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -232,7 +232,7 @@ foo((1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -254,7 +254,7 @@ foo(foo(1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"
@ -276,7 +276,7 @@ foo(foo(1));
"start": 14,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInterativeAnyParameter2.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork35.ts"
},
{
"text": ":"

Просмотреть файл

@ -0,0 +1,43 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,8 @@
function foo () {
^
{
"text": ": number",
"position": 15,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1,65 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,8 @@
foo() {
^
{
"text": ": number",
"position": 19,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,8 @@
const a = () => 1
^
{
"text": ": number",
"position": 12,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,8 @@
const a = function () { return 1}
^
{
"text": ": number",
"position": 21,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,8 @@
const a = (b) => 1
^
{
"text": ": number",
"position": 13,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1,8 @@
const x = foo(1)
^
{
"text": ": 1",
"position": 55,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1,65 @@
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,18 +1,40 @@
foo1(1, 1, 1, 1);
^
foo(1, '', false, 1, 2)
^
{
"text": "",
"position": 49,
"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,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 14,
"start": 10,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
},
{
"text": ":"
@ -20,87 +42,21 @@ foo1(1, 1, 1, 1);
]
}
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)
foo(1, '', false, 1, 2)
^
{
"text": "",
"position": 159,
"position": 168,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 87,
"start": 21,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
},
{
"text": ":"
@ -108,21 +64,65 @@ foo2(1, 2, 3)
]
}
foo3(1, 2, 3)
^
foo(1, '', false, 1, 2)
^
{
"text": "",
"position": 247,
"position": 175,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"text": "...c",
"span": {
"start": 214,
"start": 36,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveRestParameters1.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork50.ts"
},
{
"text": ":"
}
]
}
foo1(1, "", "")
^
{
"text": "",
"position": 186,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "f1",
"span": {
"start": 120,
"length": 2
},
"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"
},
{
"text": ":"

Просмотреть файл

@ -1,40 +1,27 @@
fn(/* nobody knows exactly what this param is */ 42);
^
function foo (aParameter: number, bParameter: number, cParameter: number) { }
^
{
"text": "",
"position": 76,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "x",
"span": {
"start": 12,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
},
{
"text": ":"
}
]
"text": ": void",
"position": 73,
"kind": "Type",
"whitespaceBefore": true
}
2,
^
{
"text": "",
"position": 215,
"position": 134,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "bParameter",
"span": {
"start": 115,
"start": 34,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
},
{
"text": ":"
@ -46,17 +33,17 @@ fn(/* nobody knows exactly what this param is */ 42);
^
{
"text": "",
"position": 419,
"position": 338,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "cParameter",
"span": {
"start": 135,
"start": 54,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
},
{
"text": ":"
@ -68,17 +55,17 @@ fn(/* nobody knows exactly what this param is */ 42);
^
{
"text": "",
"position": 454,
"position": 373,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "aParameter",
"span": {
"start": 95,
"start": 14,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
},
{
"text": ":"
@ -90,17 +77,17 @@ fn(/* nobody knows exactly what this param is */ 42);
^
{
"text": "",
"position": 461,
"position": 380,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "bParameter",
"span": {
"start": 115,
"start": 34,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
},
{
"text": ":"
@ -112,17 +99,17 @@ fn(/* nobody knows exactly what this param is */ 42);
^
{
"text": "",
"position": 521,
"position": 440,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "cParameter",
"span": {
"start": 135,
"start": 54,
"length": 10
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveParameterNamesWithComments.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork52.ts"
},
{
"text": ":"

Просмотреть файл

@ -0,0 +1,21 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,8 @@
get foo() { return 1; }
^
{
"text": ": number",
"position": 25,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -23,13 +23,4 @@ const b = array;
"position": 128,
"kind": "Type",
"whitespaceBefore": true
}
const x = foo(1)
^
{
"text": ": 1",
"position": 244,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,8 @@
set foo(value) { this.#value = value; }
^
{
"text": ": number",
"position": 91,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1,21 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,8 @@
set foo(value) { this.#value = value; }
^
{
"text": ": number",
"position": 83,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1,43 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,87 @@
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,18 +1,18 @@
call(1);
^
"hello",
^
{
"text": "",
"position": 131,
"position": 183,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 22,
"start": 18,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -20,21 +20,21 @@ call(1);
]
}
call(1, 2);
^
undefined,
^
{
"text": "",
"position": 140,
"position": 196,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 44,
"start": 33,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -42,21 +42,21 @@ call(1, 2);
]
}
call(1, 2);
^
null,
^
{
"text": "",
"position": 143,
"position": 211,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"span": {
"start": 55,
"start": 51,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -64,21 +64,21 @@ call(1, 2);
]
}
new call(1);
^
true,
^
{
"text": "",
"position": 156,
"position": 221,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "d",
"span": {
"start": 81,
"start": 64,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -86,21 +86,21 @@ new call(1);
]
}
foo(1)
false,
^
{
"text": "",
"position": 326,
"position": 231,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "w",
"text": "e",
"span": {
"start": 181,
"start": 80,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -108,21 +108,21 @@ foo(1)
]
}
foo(1, 2)
Infinity,
^
{
"text": "",
"position": 333,
"position": 242,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"text": "f",
"span": {
"start": 219,
"start": 96,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -130,21 +130,21 @@ foo(1, 2)
]
}
foo(1, 2)
^
-Infinity,
^
{
"text": "",
"position": 336,
"position": 256,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"text": "g",
"span": {
"start": 230,
"start": 111,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -152,21 +152,21 @@ foo(1, 2)
]
}
new Class(1)
^
NaN,
^
{
"text": "",
"position": 475,
"position": 271,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"text": "h",
"span": {
"start": 369,
"start": 126,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -174,21 +174,21 @@ new Class(1)
]
}
new Class(1, 2)
^
/hello/g,
^
{
"text": "",
"position": 488,
"position": 280,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"text": "i",
"span": {
"start": 397,
"start": 141,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"
@ -196,21 +196,21 @@ new Class(1, 2)
]
}
new Class(1, 2)
^
123n,
^
{
"text": "",
"position": 491,
"position": 294,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "c",
"text": "j",
"span": {
"start": 408,
"start": 156,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveOverloadCall.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork64.ts"
},
{
"text": ":"

Просмотреть файл

@ -0,0 +1,8 @@
const f: F = (a, b = 1) => { }
^
{
"text": ": string",
"position": 55,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1,8 @@
bar: function (x?): void {
^
{
"text": ": boolean",
"position": 87,
"kind": "Type",
"whitespaceBefore": true
}

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1,43 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1 @@
=== No inlay hints ===

Просмотреть файл

@ -0,0 +1,65 @@
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": ":"
}
]
}

Просмотреть файл

@ -0,0 +1,17 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 100,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "c:",
"position": 106,
"kind": "Parameter",
"whitespaceAfter": true
}

Просмотреть файл

@ -0,0 +1,17 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 120,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "d:",
"position": 126,
"kind": "Parameter",
"whitespaceAfter": true
}

Просмотреть файл

@ -0,0 +1,17 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 101,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "b:",
"position": 107,
"kind": "Parameter",
"whitespaceAfter": true
}

Просмотреть файл

@ -0,0 +1,17 @@
foo(1, ...x);
^
{
"text": "a:",
"position": 101,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(1, ...x);
^
{
"text": "b:",
"position": 104,
"kind": "Parameter",
"whitespaceAfter": true
}

Просмотреть файл

@ -0,0 +1,17 @@
foo(...x, 3);
^
{
"text": "a:",
"position": 112,
"kind": "Parameter",
"whitespaceAfter": true
}
foo(...x, 3);
^
{
"text": "c:",
"position": 118,
"kind": "Parameter",
"whitespaceAfter": true
}

Просмотреть файл

@ -0,0 +1,26 @@
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
}

Просмотреть файл

@ -0,0 +1,8 @@
foo(...x, 1);
^
{
"text": "d:",
"position": 152,
"kind": "Parameter",
"whitespaceAfter": true
}

Просмотреть файл

@ -0,0 +1,65 @@
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,18 +1,18 @@
foo1(1)(2);
call(1);
^
{
"text": "",
"position": 89,
"position": 131,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 14,
"start": 22,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveWithClosures.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
},
{
"text": ":"
@ -20,21 +20,43 @@ foo1(1)(2);
]
}
foo1(1)(2);
call(1, 2);
^
{
"text": "",
"position": 140,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"span": {
"start": 44,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
},
{
"text": ":"
}
]
}
call(1, 2);
^
{
"text": "",
"position": 92,
"position": 143,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"text": "c",
"span": {
"start": 39,
"start": 55,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveWithClosures.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
},
{
"text": ":"
@ -42,43 +64,21 @@ foo1(1)(2);
]
}
return a(1) + 2
^
new call(1);
^
{
"text": "",
"position": 151,
"position": 156,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "b",
"text": "d",
"span": {
"start": 114,
"start": 81,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveWithClosures.ts"
},
{
"text": ":"
}
]
}
foo2((c: number) => c + 1);
^
{
"text": "",
"position": 165,
"kind": "Parameter",
"whitespaceAfter": true,
"displayParts": [
{
"text": "a",
"span": {
"start": 110,
"length": 1
},
"file": "/tests/cases/fourslash/inlayHintsInteractiveWithClosures.ts"
"file": "/tests/cases/fourslash/inlayHintsShouldWork9.ts"
},
{
"text": ":"

Просмотреть файл

@ -1,35 +0,0 @@
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
}

Просмотреть файл

@ -1,29 +0,0 @@
/// <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
});

Просмотреть файл

@ -1,30 +0,0 @@
/// <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
});

Просмотреть файл

@ -1,49 +0,0 @@
/// <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,14 +0,0 @@
/// <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 });

Просмотреть файл

@ -1,23 +0,0 @@
/// <reference path="fourslash.ts" />
////function foo(a: unknown, b: unknown, c: unknown) { }
////function foo1(...x: [number, number | undefined]) {
//// foo(...x, 3);
////}
////function foo2(...x: []) {
//// foo(...x, 1, 2, 3);
////}
////function foo3(...x: [number, number?]) {
//// foo(1, ...x);
////}
////function foo4(...x: [number, number?]) {
//// foo(...x, 3);
////}
////function foo5(...x: [number, number]) {
//// foo(...x, 3);
////}
verify.baselineInlayHints(undefined, {
includeInlayParameterNameHints: "all",
interactiveInlayHints: true,
});

Просмотреть файл

@ -1,18 +0,0 @@
/// <reference path="fourslash.ts" />
//// function foo1(a: number) {
//// return (b: number) => {
//// return a + b
//// }
//// }
//// foo1(1)(2);
//// function foo2(a: (b: number) => number) {
//// return a(1) + 2
//// }
//// foo2((c: number) => c + 1);
verify.baselineInlayHints(undefined, {
includeInlayParameterNameHints: "all",
interactiveInlayHints: true
});

Просмотреть файл

@ -1,30 +0,0 @@
/// <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",
});

Просмотреть файл

@ -1,49 +0,0 @@
/// <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" });

Просмотреть файл

@ -1,23 +0,0 @@
/// <reference path="fourslash.ts" />
//// function foo1 (a: number, b: number) {}
//// function foo2 (c: number, d: number) {}
//// function foo3 (e: number, f: number) {}
//// function foo4 (g: number, h: number) {}
//// function foo5 (i: number, j: number) {}
//// function foo6 (k: number, i: number) {}
//// function c1 () { foo1(/*a*/1, /*b*/2); }
//// function c2 () { foo2(/*c*/1, /*d*/2); }
//// function c3 () { foo3(/*e*/1, /*f*/2); }
//// function c4 () { foo4(/*g*/1, /*h*/2); }
//// function c5 () { foo5(/*i*/1, /*j*/2); }
//// function c6 () { foo6(/*k*/1, /*l*/2); }
const start = test.markerByName('c');
const end = test.markerByName('h');
const span = { start: start.position, length: end.position - start.position };
verify.baselineInlayHints(span, {
includeInlayParameterNameHints: "literals",
})

Просмотреть файл

@ -1,23 +0,0 @@
/// <reference path="fourslash.ts" />
//// function foo1 (a: number, b: number) {}
//// function foo2 (c: number, d: number) {}
//// function foo3 (e: number, f: number) {}
//// function foo4 (g: number, h: number) {}
//// function foo5 (i: number, j: number) {}
//// function foo6 (k: number, l: number) {}
//// foo1(/*a*/1, /*b*/2);
//// foo2(/*c*/1, /*d*/2);
//// foo3(/*e*/1, /*f*/2);
//// foo4(/*g*/1, /*h*/2);
//// foo5(/*i*/1, /*j*/2);
//// foo6(/*k*/1, /*l*/2);
const start = test.markerByName('c');
const end = test.markerByName('h');
const span = { start: start.position, length: end.position - start.position };
verify.baselineInlayHints(span, {
includeInlayParameterNameHints: "literals",
});

Просмотреть файл

@ -1,14 +0,0 @@
/// <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" });

Просмотреть файл

@ -1,22 +0,0 @@
/// <reference path="fourslash.ts" />
////function foo(a: unknown, b: unknown, c: unknown) { }
////function foo1(...x: [number, number | undefined]) {
//// foo(...x, 3);
////}
////function foo2(...x: []) {
//// foo(...x, 1, 2, 3);
////}
////function foo3(...x: [number, number?]) {
//// foo(1, ...x);
////}
////function foo4(...x: [number, number?]) {
//// foo(...x, 3);
////}
////function foo5(...x: [number, number]) {
//// foo(...x, 3);
////}
verify.baselineInlayHints(undefined, {
includeInlayParameterNameHints: "all"
});

Просмотреть файл

@ -1,26 +0,0 @@
/// <reference path="fourslash.ts" />
//// function foo1 () {
//// return 1
//// }
//// function foo2 (): number {
//// return 1
//// }
//// class C {
//// foo() {
//// return 1
//// }
//// }
//// const a = () => 1
//// const b = function () { return 1 }
//// const c = (b) => 1
//// const d = b => 1
verify.baselineInlayHints(undefined, {
includeInlayFunctionLikeReturnTypeHints: true,
});

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше