Skip to content

Commit

Permalink
chore: Support type parameters on JSX components in TSX (<Foo<Bar> />)
Browse files Browse the repository at this point in the history
  • Loading branch information
PartMan7 committed Apr 8, 2024
1 parent 51d5c89 commit dd8cea4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/printer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dd8cea4

Please sign in to comment.