fix: remove accessibility of constructor (#10658)
This commit is contained in:
parent
0f949990c3
commit
2640e5a27c
@ -93,6 +93,7 @@ export default declare(
|
|||||||
// Rest handled by Function visitor
|
// Rest handled by Function visitor
|
||||||
},
|
},
|
||||||
constructor(path, classPath) {
|
constructor(path, classPath) {
|
||||||
|
if (path.node.accessibility) path.node.accessibility = null;
|
||||||
// Collects parameter properties so that we can add an assignment
|
// Collects parameter properties so that we can add an assignment
|
||||||
// for each of them in the constructor body
|
// for each of them in the constructor body
|
||||||
//
|
//
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
class C {
|
class C {
|
||||||
m(): void;
|
m(): void;
|
||||||
public m(x?: number, ...y: number[]): void {}
|
public m(x?: number, ...y: number[]): void {}
|
||||||
|
public constructor() {}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
class C {
|
class C {
|
||||||
m(x, ...y) {}
|
m(x, ...y) {}
|
||||||
|
|
||||||
|
constructor() {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user