-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Component commits: f7af8f4 fix(45393): show parameter name hints for unary literal expressions Co-authored-by: Oleksandr T <oleksandr.tarasiuk@outlook.com>
- Loading branch information
1 parent
0648de8
commit c82ccf1
Showing
2 changed files
with
46 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
////function foo(a: number, b: number, c: number, d: number) {} | ||
////foo(/*a*/1, /*b*/+1, /*c*/-1, /*d*/+"1"); | ||
|
||
const [a, b, c, d] = test.markers(); | ||
verify.getInlayHints([ | ||
{ | ||
text: "a:", | ||
position: a.position, | ||
kind: ts.InlayHintKind.Parameter, | ||
whitespaceAfter: true | ||
}, | ||
{ | ||
text: "b:", | ||
position: b.position, | ||
kind: ts.InlayHintKind.Parameter, | ||
whitespaceAfter: true | ||
}, | ||
{ | ||
text: "c:", | ||
position: c.position, | ||
kind: ts.InlayHintKind.Parameter, | ||
whitespaceAfter: true | ||
}, | ||
{ | ||
text: "d:", | ||
position: d.position, | ||
kind: ts.InlayHintKind.Parameter, | ||
whitespaceAfter: true | ||
} | ||
], undefined, { | ||
includeInlayParameterNameHints: "literals" | ||
}); |