mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-04-17 01:49:41 -05:00
fix(49178): check expression with type arguments in inlay hints (#49179)
This commit is contained in:
@@ -47,7 +47,7 @@ namespace ts.InlayHints {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isTypeNode(node)) {
|
||||
if (isTypeNode(node) && !isExpressionWithTypeArguments(node)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
25
tests/cases/fourslash/inlayHintsShouldWork68.ts
Normal file
25
tests/cases/fourslash/inlayHintsShouldWork68.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
////const foo = (a = 1) => class { }
|
||||
////
|
||||
////const C1 = class extends foo(/*1*/1) { }
|
||||
////class C2 extends foo(/*2*/1) { }
|
||||
|
||||
const markers = test.markers();
|
||||
|
||||
verify.getInlayHints([
|
||||
{
|
||||
text: 'a:',
|
||||
position: markers[0].position,
|
||||
kind: ts.InlayHintKind.Parameter,
|
||||
whitespaceAfter: true
|
||||
},
|
||||
{
|
||||
text: 'a:',
|
||||
position: markers[1].position,
|
||||
kind: ts.InlayHintKind.Parameter,
|
||||
whitespaceAfter: true
|
||||
},
|
||||
], undefined, {
|
||||
includeInlayParameterNameHints: "literals"
|
||||
});
|
||||
Reference in New Issue
Block a user