在下面的代码中,如何在未在其自己的类内显式指定关键字“用户”的情况下访问变量User
?
class User {
say = () => {
// Here, I have to explicitly write "User". Is there
// some javascript trick to get the class reference inside
// its own class without explicitly writing the name?
console.log(User);
}
}