GS
class A {
static param1 = {}
static init() {
this.param1 = new B();
this.method2();
}
static method2() {
console.log(this.param1);
}
}
Меня за это не сожгут на костре?
Size: a a a
GS
PS
PS
GS
PS
PS
GS
ES
PS
class A {
static init() {
this.param1 = new B();
this.method2();
}
static method2() {
console.log(this.param1);
}
}
A.param1 = {}; // то самое static param
ES
R
ES
R
ES
ES
R
ES
GS
GS