This is something I\'ve been doing in older versions of TypeScript and I use this method in C#, but it doesn\'t work in the latest 1.0 version of TypeScript.
Here\'s
You are no longer allowed to use T
here:
class Base>
--------------------------^
You either have to make your class non-generic or use:
class Base>
The reason given for this was to make the compiler simpler:
In our continued efforts to simplify the language, we're simplifying what generic constraints can entail.
The added overhead in terms of type-checking, error-reporting, and design complexity did not add enough additional expressiveness to make it worthwhile for 1.0. We may revisit this in future versions of TypeScript.
-- Breaking Changes Wiki