Create an instance from your javascript class without new
keyword because this is more classy ;)
install
npm i classy-decorator --save
very easy to use
import classy from "classy-decorator";
@classy()
class IamClassy {
constructor() {
console.log("IamClassy Instance!");
}
}
console.log(new IamClassy() instanceof IamClassy); // true
console.log(IamClassy() instanceof IamClassy); // true