I'd like to specify a generic type as a generic parameter so that I can use it in the body without a specific type parameter. Here's an example:
import Immutable from 'immutable';
interface IThing<List = Array> {
numbers: List<number>;
strings: List<string>;
}
class ImmutableThing implements MyThing<Immutable.List> {
}
But of course Typescript doesn't like this, in multiple ways--for one thing, Immutable.List needs a type parameter, for another Array needs a generic parameter (and if I do something like List<T> = Array<T>
it says "cannot find name T").
Is there a way to do what I want in Typescript?