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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
=== tests/cases/conformance/classes/members/privateNames/privateNameStaticFieldClassExpression.ts ===
class B {
>B : B
static #foo = class {
>#foo : typeof (Anonymous class)
>class { constructor() { console.log("hello"); new B.#foo2(); } static test = 123; field = 10; } : typeof (Anonymous class)
constructor() {
console.log("hello");
>console.log("hello") : void
>console.log : (...data: any[]) => void
>console : Console
>log : (...data: any[]) => void
>"hello" : "hello"
new B.#foo2();
>new B.#foo2() : Foo
>B.#foo2 : typeof Foo
>B : typeof B
}
static test = 123;
>test : number
>123 : 123
field = 10;
>field : number
>10 : 10
};
static #foo2 = class Foo {
>#foo2 : typeof Foo
>class Foo { static otherClass = 123; } : typeof Foo
>Foo : typeof Foo
static otherClass = 123;
>otherClass : number
>123 : 123
};
m() {
>m : () => void
console.log(B.#foo.test)
>console.log(B.#foo.test) : void
>console.log : (...data: any[]) => void
>console : Console
>log : (...data: any[]) => void
>B.#foo.test : number
>B.#foo : typeof (Anonymous class)
>B : typeof B
>test : number
B.#foo.test = 10;
>B.#foo.test = 10 : 10
>B.#foo.test : number
>B.#foo : typeof (Anonymous class)
>B : typeof B
>test : number
>10 : 10
new B.#foo().field;
>new B.#foo().field : number
>new B.#foo() : (Anonymous class)
>B.#foo : typeof (Anonymous class)
>B : typeof B
>field : number
}
}
|