Closed
Description
I have decorator:
export function Document() {
return function(objectConstructor: Function) {
console.log(objectConstructor.name); // when targeting es5 it gives me what I want - the name of my class. When targeting es6 it does not give anything
}
}
Here is decorator usage:
@Document()
export class User {
}
Im using "User" class name to create a document called "User", I need information how class is called. I always used es5, but now when I switched to es6 compile target I dont have information about class name anymore. Is it a bug, or it by design? If second then what is the way to get the class name?