In your example you have two "bugs", you're not capitalizing the constructor name and you're not using `new`. I would have to make two separate mistakes to reproduce the issue you're talking about.
The only way I'd make the first mistake is if I was unfamiliar with `your-class`'s API, so nothing can save me there.
The only way I'd make the first mistake is if I was unfamiliar with `your-class`'s API, so nothing can save me there.
JSHint would catch the second one.