class YourClass {} const fooInst = new YourClass(); //get the classname: console.log(fooInst.constructor.name); // YourClass console.log(YourClass.name);