class X { public X: number; constructor() { return new Y; } } class Y extends X { public Y: number; } const obj = new X; console.log(obj.Y); /// TS2339: Property 'Y' does not exist on type 'X' It's more common than only Object.assign. 👎 26 weswigham added the In...
However, if generic functions are eventually introduced on something like the lines of the draft design paper, then you'd have exactly the same problem there - except worse as you could have any number of parameters to deal with. For example, if one introduced a generic function to replace ...