fix: remove accessibility of constructor (#10658)

This commit is contained in:
Huáng Jùnliàng 2019-11-05 14:52:57 -05:00 committed by Brian Ng
parent 0f949990c3
commit 2640e5a27c
3 changed files with 4 additions and 0 deletions

View File

@ -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
//

View File

@ -1,4 +1,5 @@
class C {
m(): void;
public m(x?: number, ...y: number[]): void {}
public constructor() {}
}

View File

@ -1,4 +1,6 @@
class C {
m(x, ...y) {}
constructor() {}
}