const g = [];
class G {
#g;
constructor(shared){
if (shared) {
this.#g = g;
} else {
this.#g = [];
}
}
}
const g1 = [];
class H {
#g;
constructor(shared1){
if (shared1) {
this.#g = g1;
} else {
this.#g = [];
}
}
}
console.log(new G(true), new H(true));