Skip to content

Commit

Permalink
fix: add name to TSTypeParameter visitors
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Dec 12, 2024
1 parent 2bfbba4 commit 2ea384f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/babel-types/src/definitions/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,9 @@ defineType("TSTypeParameterDeclaration", {

defineType("TSTypeParameter", {
builder: ["constraint", "default", "name"],
visitor: ["constraint", "default"],
visitor: process.env.BABEL_8_BREAKING
? ["name", "constraint", "default"]
: ["constraint", "default"],
fields: {
name: {
validate: !process.env.BABEL_8_BREAKING
Expand Down

0 comments on commit 2ea384f

Please sign in to comment.