From dd8cea468ef6e6b67a6336d92a8f6eb8974164f6 Mon Sep 17 00:00:00 2001 From: Parth Mane Date: Mon, 8 Apr 2024 13:02:00 +0530 Subject: [PATCH] chore: Support type parameters on JSX components in TSX ( />) --- lib/printer.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/printer.ts b/lib/printer.ts index 5b3f9618..df020115 100644 --- a/lib/printer.ts +++ b/lib/printer.ts @@ -1331,6 +1331,8 @@ function genericPrintNoParens(path: any, options: any, print: any) { case "JSXOpeningElement": { parts.push("<", path.call(print, "name")); + const typeDefPart = path.call(print, "typeParameters"); + if (typeDefPart.length) parts.push(typeDefPart); const attrParts: any[] = []; path.each(function (attrPath: any) {