You can override constructor output by returning object type. class A { constructor(){ return new Number(0) } } console.log(new A == 0) // => true