Skip to content

Commit 3da5982

Browse files
authored
fix(43254): show named tuple member type (microsoft#43273)
1 parent ae884b1 commit 3da5982

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/services/services.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,9 @@ namespace ts {
16191619
if (isNewExpression(node.parent) && node.pos === node.parent.pos) {
16201620
return node.parent.expression;
16211621
}
1622+
if (isNamedTupleMember(node.parent) && node.pos === node.parent.pos) {
1623+
return node.parent;
1624+
}
16221625
return node;
16231626
}
16241627

@@ -1633,6 +1636,7 @@ namespace ts {
16331636
case SyntaxKind.ThisKeyword:
16341637
case SyntaxKind.ThisType:
16351638
case SyntaxKind.SuperKeyword:
1639+
case SyntaxKind.NamedTupleMember:
16361640
return true;
16371641
default:
16381642
return false;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
////type foo = [/**/x: string];
4+
5+
verify.quickInfoAt("", "string");

0 commit comments

Comments
 (0)