Two things to remember: firstly, generic files are erased at compile time. They have no impact at run time, so any attempt to refer to a generic type as a run-time value does not make sense.
Secondly, it is possible for the Datum derived class to have constructor parameters. Even if T really exists, you can just blindly new with null arguments.
Combining this, you want the following:
class Datum {} class Data<T extends Datum> { datum: T constructor(ctor: new() => T) { this.datum = new ctor(); } } class ByteDatum extends Datum { new() { } } let y = new Data(ByteDatum); let x = y.datum;
source share