-
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ts5.2 clickable inlay parameter hints (#2162)
- Loading branch information
1 parent
62a1c94
commit 582b76a
Showing
16 changed files
with
245 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 21 additions & 9 deletions
30
...er/test/plugins/typescript/features/inlayHints/fixtures/component-handler/expectedv2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...ugins/typescript/features/inlayHints/fixtures/disable-argument-name-match/expectedv2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[ | ||
{ | ||
"label": ": void", | ||
"position": { "line": 1, "character": 33 }, | ||
"kind": 1, | ||
"paddingLeft": true | ||
}, | ||
{ | ||
"label": [ | ||
{ | ||
"value": "message", | ||
"location": { | ||
"range": { | ||
"start": { "line": 1, "character": 17 }, | ||
"end": { "line": 1, "character": 24 } | ||
}, | ||
"uri": "<workspaceUri>/disable-argument-name-match/input.svelte" | ||
} | ||
}, | ||
{ "value": ":" } | ||
], | ||
"position": { "line": 5, "character": 8 }, | ||
"kind": 2, | ||
"paddingRight": true | ||
} | ||
] |
7 changes: 7 additions & 0 deletions
7
.../plugins/typescript/features/inlayHints/fixtures/disable-argument-name-match/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script lang="ts"> | ||
function log(message: string) { | ||
} | ||
let message: string = 'Hello World'; | ||
log(message); | ||
</script> |
8 changes: 8 additions & 0 deletions
8
...t/plugins/typescript/features/inlayHints/fixtures/disable-type-name-match/expectedv2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[ | ||
{ | ||
"label": ": number", | ||
"position": { "line": 1, "character": 14 }, | ||
"kind": 1, | ||
"paddingLeft": true | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
...test/plugins/typescript/features/inlayHints/fixtures/disable-type-name-match/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script lang="ts"> | ||
let number = 1; | ||
</script> |
24 changes: 15 additions & 9 deletions
24
...rver/test/plugins/typescript/features/inlayHints/fixtures/element-handler/expectedv2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...-server/test/plugins/typescript/features/inlayHints/fixtures/element-handler/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<script lang="ts"> | ||
function log(message: any): void {} | ||
</script> | ||
|
||
<button on:click></button> | ||
<button on:click={e => console.log(e)}></button> | ||
<button on:click={e => log(e)}></button> |
24 changes: 15 additions & 9 deletions
24
...st/plugins/typescript/features/inlayHints/fixtures/function-call-in-props/expectedv2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...test/plugins/typescript/features/inlayHints/fixtures/property-declaration/expectedv2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{ "label": ": number", "position": { "line": 2, "character": 9 }, "kind": 1, "paddingLeft": true }] |
5 changes: 5 additions & 0 deletions
5
...er/test/plugins/typescript/features/inlayHints/fixtures/property-declaration/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<script lang="ts"> | ||
class A { | ||
b = 1 | ||
} | ||
</script> |
49 changes: 35 additions & 14 deletions
49
...erver/test/plugins/typescript/features/inlayHints/fixtures/reactive-block/expectedv2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,50 @@ | ||
[ | ||
{ | ||
"label": ": number", | ||
"position": { | ||
"line": 1, | ||
"character": 12 | ||
}, | ||
"position": { "line": 1, "character": 12 }, | ||
"kind": 1, | ||
"paddingLeft": true | ||
}, | ||
{ | ||
"label": "message:", | ||
"position": { | ||
"line": 2, | ||
"character": 19 | ||
}, | ||
"label": [ | ||
{ | ||
"value": "message", | ||
"location": { | ||
"range": { | ||
"start": { "line": 10, "character": 17 }, | ||
"end": { "line": 10, "character": 24 } | ||
}, | ||
"uri": "<workspaceUri>/reactive-block/input.svelte" | ||
} | ||
}, | ||
{ "value": ":" } | ||
], | ||
"position": { "line": 2, "character": 11 }, | ||
"kind": 2, | ||
"paddingRight": true | ||
}, | ||
{ | ||
"label": "message:", | ||
"position": { | ||
"line": 4, | ||
"character": 20 | ||
}, | ||
"label": [ | ||
{ | ||
"value": "message", | ||
"location": { | ||
"range": { | ||
"start": { "line": 10, "character": 17 }, | ||
"end": { "line": 10, "character": 24 } | ||
}, | ||
"uri": "<workspaceUri>/reactive-block/input.svelte" | ||
} | ||
}, | ||
{ "value": ":" } | ||
], | ||
"position": { "line": 4, "character": 12 }, | ||
"kind": 2, | ||
"paddingRight": true | ||
}, | ||
{ | ||
"label": ": any", | ||
"position": { "line": 10, "character": 24 }, | ||
"kind": 1, | ||
"paddingLeft": true | ||
} | ||
] |
Oops, something went wrong.