Closed
Description
Is there any way to specialize an generic interface.
Examples
interface Gen<T> {
method1 (): void
}
// not use '='? it is a break change
interface Gen<T = number> {
method2 (): void
}
let v1 = {} as Gen<string>
v1.method1() // correct , Gen<string> has method1
v1.method2() // error, Gen<string> does not has method2
let v2 = {} as Gen<number>
v1.method2() // correct , Gen<string> has method2