I have a class with a static method:
class User {
constructor() {
User.staticMethod();
}
static staticMethod() {}
}
Is there something like this so for static methods (i.e. refer to the current class without an instance).
this.staticMethod()
so I don't have to write the class name 'User'.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…