class C1 { #priv() {} static check(obj) { return #priv in obj; } } console.log(C1.check(new C1())) // output true