mirror of
https://github.com/swc-project/swc.git
synced 2024-12-22 05:01:42 +03:00
29 lines
398 B
TypeScript
29 lines
398 B
TypeScript
// Parameter properties are only valid in constructor definitions, not even in other forms of construct signatures
|
|
|
|
class C {
|
|
constructor(public x, private y) { }
|
|
}
|
|
|
|
class C2 {
|
|
constructor(public x) { }
|
|
}
|
|
|
|
class C3 {
|
|
constructor(private x) { }
|
|
}
|
|
|
|
interface I {
|
|
new (public x);
|
|
}
|
|
|
|
interface I2 {
|
|
new (private x);
|
|
}
|
|
|
|
var a: {
|
|
new (public x);
|
|
}
|
|
|
|
var b: {
|
|
new (private x);
|
|
} |