Skip to content

Commit

Permalink
fix: remove accessibility of constructor (#10658)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung authored and existentialism committed Nov 5, 2019
1 parent 0f94999 commit 2640e5a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/babel-plugin-transform-typescript/src/index.js
Expand Up @@ -93,6 +93,7 @@ export default declare(
// Rest handled by Function visitor
},
constructor(path, classPath) {
if (path.node.accessibility) path.node.accessibility = null;
// Collects parameter properties so that we can add an assignment
// for each of them in the constructor body
//
Expand Down
@@ -1,4 +1,5 @@
class C {
m(): void;
public m(x?: number, ...y: number[]): void {}
public constructor() {}
}
@@ -1,4 +1,6 @@
class C {
m(x, ...y) {}

constructor() {}

}

0 comments on commit 2640e5a

Please sign in to comment.