mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Inlay hints for ThisType nodes (#56564)
This commit is contained in:
@@ -77,6 +77,7 @@ import {
|
||||
isRestTypeNode,
|
||||
isSpreadElement,
|
||||
isStringLiteral,
|
||||
isThisTypeNode,
|
||||
isTupleTypeNode,
|
||||
isTypeLiteralNode,
|
||||
isTypeNode,
|
||||
@@ -792,6 +793,10 @@ export function provideInlayHints(context: InlayHintsContext): InlayHint[] {
|
||||
parts.push({ text: tokenToString(node.operator) });
|
||||
visitForDisplayParts(node.operand);
|
||||
break;
|
||||
case SyntaxKind.ThisType:
|
||||
Debug.assertNode(node, isThisTypeNode);
|
||||
parts.push({ text: "this" });
|
||||
break;
|
||||
default:
|
||||
Debug.failBadSyntaxKind(node);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user