From dc18b07c2d59e0e9f2196657b3c3eaf3fa04ab08 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Tue, 21 Mar 2023 22:04:51 +0000 Subject: [PATCH] Include type parameters in tagged template literals in `isPartOfTypeNode`. --- src/compiler/utilities.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 159aedabbf228..ea8027a53aa56 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2450,10 +2450,8 @@ export function isPartOfTypeNode(node: Node): boolean { return node === (parent as TypeAssertion).type; case SyntaxKind.CallExpression: case SyntaxKind.NewExpression: - return contains((parent as CallExpression).typeArguments, node); case SyntaxKind.TaggedTemplateExpression: - // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. - return false; + return contains((parent as CallExpression | TaggedTemplateExpression).typeArguments, node); } } }