Has anybody done constructor overloading in TypeScript. On page 64 of the language specification (v 0.8), there are statements describing constructor overloads, but there wa
You can handle this by :
class Box { x: number; y: number; height: number; width: number; constructor(obj?: Partial) { assign(this, obj); } }
Partial will make your fields (x,y, height, width) optionals, allowing multiple constructors
eg: you can do new Box({x,y}) without height, and width.
new Box({x,y})