Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript get class name

class YourClass {}

const fooInst = new YourClass();

//get the classname:
console.log(fooInst.constructor.name); // YourClass
console.log(YourClass.name); 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #typescript #class
ADD COMMENT
Topic
Name
2+3 =