We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f94999 commit 2640e5aCopy full SHA for 2640e5a
packages/babel-plugin-transform-typescript/src/index.js
@@ -93,6 +93,7 @@ export default declare(
93
// Rest handled by Function visitor
94
},
95
constructor(path, classPath) {
96
+ if (path.node.accessibility) path.node.accessibility = null;
97
// Collects parameter properties so that we can add an assignment
98
// for each of them in the constructor body
99
//
packages/babel-plugin-transform-typescript/test/fixtures/class/methods/input.ts
@@ -1,4 +1,5 @@
1
class C {
2
m(): void;
3
public m(x?: number, ...y: number[]): void {}
4
+ public constructor() {}
5
}
packages/babel-plugin-transform-typescript/test/fixtures/class/methods/output.js
@@ -1,4 +1,6 @@
m(x, ...y) {}
+ constructor() {}
+
6
0 commit comments