This. Multiple/overloading constructors is common practice in Java applications but not so much in Typescript. In fact I have never seen it done via typescript and am not sure why it would be.
Even if there is a good reason, looks like it leads to a dead end
Because it’s impossible. JavaScript does not have runtime type information, so function overloading (including constructors) cannot be done. Arguments are not part of a function’s signature.
That’s a pretty solid reason for avoiding the practice. And a great explanation for why an error would be thrown in the process.
Also a good example of the deceptive similarities between TypeScript and Java. At this point I’m writing mostly in Java and can say there are few similarities despite appearances.