class Test1 {}
class Test2 {
get name(){ return this.constructor.name}
}
const Test3 = function () {}
const Test4 = function () {
this.name =()=> this.constructor.name
}
const a = new Test1();
const b = new Test2();
const c = new Test3();
const d = new Test4();
console.log(a.constructor.name);
console.log(b.constructor.name);
console.log(c.constructor.name);
console.log(d.constructor.name);
console.log(b.name);
console.log(d.name());
console.log(Test1.name);
не знаю, может это поможет