diff --git a/src/language-js/parse/babel.js b/src/language-js/parse/babel.js
index e0cb0d76e..018708292 100644
--- a/src/language-js/parse/babel.js
+++ b/src/language-js/parse/babel.js
@@ -192,8 +192,6 @@ const allowedReasonCodes = new Set([
"StrictFunction",
"ForInOfLoopInitializer",
- "ConstructorHasTypeParameters",
-
"DecoratorExportClass",
"ParamDupe",
"InvalidDecimal",
diff --git a/tests/format/misc/errors/typescript/tuple/__snapshots__/format.test.js.snap b/tests/format/misc/errors/typescript/tuple/__snapshots__/format.test.js.snap
index 778208ad6..6cc635c1f 100644
--- a/tests/format/misc/errors/typescript/tuple/__snapshots__/format.test.js.snap
+++ b/tests/format/misc/errors/typescript/tuple/__snapshots__/format.test.js.snap
@@ -14,6 +14,13 @@ exports[`snippet: #0 [babel-ts] format 2`] = `
Cause: A required element cannot follow an optional element. (1:17)"
`;
+exports[`snippet: #0 [babel-ts] format 3`] = `
+"Type parameters cannot appear on a constructor declaration. (1:24)
+> 1 | class A { 'constructor'() {} }
+ | ^
+Cause: Type parameters cannot appear on a constructor declaration. (1:23)"
+`;
+
exports[`snippet: #0 [oxc-ts] format 1`] = `
"Expected \`,\` or \`]\` but found \`:\` (1:14)
> 1 | type T = [x.y: A];
@@ -40,12 +47,25 @@ exports[`snippet: #1 [babel-ts] format 1`] = `
Cause: Tuple members must be labeled with a simple identifier. (1:10)"
`;
+exports[`snippet: #1 [babel-ts] format 2`] = `
+"Type parameters cannot appear on a constructor declaration. (1:22)
+> 1 | class A { constructor() {} }
+ | ^
+Cause: Type parameters cannot appear on a constructor declaration. (1:21)"
+`;
+
exports[`snippet: #1 [oxc-ts] format 1`] = `
"Expected \`,\` or \`]\` but found \`:\` (1:15)
> 1 | type T = [x: A];
| ^"
`;
+exports[`snippet: #1 [oxc-ts] format 2`] = `
+"Type parameters cannot appear on a constructor declaration (1:22)
+> 1 | class A { constructor() {} }
+ | ^^^"
+`;
+
exports[`snippet: #1 [typescript] format 1`] = `
"',' expected. (1:15)
> 1 | type T = [x: A];
diff --git a/tests/format/misc/errors/typescript/tuple/format.test.js b/tests/format/misc/errors/typescript/tuple/format.test.js
index e3c7026cf..c9b054812 100644
--- a/tests/format/misc/errors/typescript/tuple/format.test.js
+++ b/tests/format/misc/errors/typescript/tuple/format.test.js
@@ -17,6 +17,8 @@ runFormatTest(
snippets: [
// A required element cannot follow an optional element.
"type T = [x?: A, y: B];",
+ // Type parameters cannot appear on a constructor declaration.
+ "class A { constructor() {} }",
],
},
[
@@ -25,3 +27,18 @@ runFormatTest(
"oxc-ts",
],
);
+
+runFormatTest(
+ {
+ importMeta: import.meta,
+ snippets: [
+ // Type parameters cannot appear on a constructor declaration.
+ "class A { 'constructor'() {} }",
+ ],
+ },
+ [
+ // "typescript",
+ "babel-ts",
+ // "oxc-ts",
+ ],
+);