1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
//// [tests/cases/compiler/paramPropertiesInSignatures.ts] ////
=== paramPropertiesInSignatures.ts ===
class C1 {
>C1 : C1
constructor(public p1:string); // ERROR
>p1 : string
constructor(private p2:number); // ERROR
>p2 : number
constructor(public p3:any) {} // OK
>p3 : any
}
declare class C2 {
>C2 : C2
constructor(public p1:string); // ERROR
>p1 : string
constructor(private p2:number); // ERROR
>p2 : number
constructor(public p3:any); // ERROR
>p3 : any
}
|