mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
fix(49178): check expression with type arguments in inlay hints (#49179)
This commit is contained in:
parent
a5b1f95c23
commit
3da165e3df
@ -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"
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user