Skip to content

Commit

Permalink
Organize/consolidate inlay hint tests (#55332)
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaSolOs authored Aug 14, 2023
1 parent f5e73d7 commit 05cb53e
Show file tree
Hide file tree
Showing 175 changed files with 2,196 additions and 1,784 deletions.
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -1,216 +1,216 @@
"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": ":"
}
]
}

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": ":"
}
]
}

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": ":"
}
]
}

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": ":"
}
]
}

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": ":"
}
]
}

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": ":"
}
]
}

-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": ":"
}
]
}

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": ":"
}
]
}

/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": ":"
}
]
}

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": ":"
Expand Down
Loading

0 comments on commit 05cb53e

Please sign in to comment.