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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
=== tests/cases/conformance/classes/classStaticBlock/classStaticBlock3.ts ===
const a = 1;
>a : 1
>1 : 1
class C {
>C : C
static f1 = 1;
>f1 : number
>1 : 1
static {
console.log(C.f1, C.f2, C.f3)
>console.log(C.f1, C.f2, C.f3) : void
>console.log : (...data: any[]) => void
>console : Console
>log : (...data: any[]) => void
>C.f1 : number
>C : typeof C
>f1 : number
>C.f2 : number
>C : typeof C
>f2 : number
>C.f3 : number
>C : typeof C
>f3 : number
}
static f2 = 2;
>f2 : number
>2 : 2
static {
console.log(C.f1, C.f2, C.f3)
>console.log(C.f1, C.f2, C.f3) : void
>console.log : (...data: any[]) => void
>console : Console
>log : (...data: any[]) => void
>C.f1 : number
>C : typeof C
>f1 : number
>C.f2 : number
>C : typeof C
>f2 : number
>C.f3 : number
>C : typeof C
>f3 : number
}
static f3 = 3;
>f3 : number
>3 : 3
}
|