Closed
Description
I was wondering: Are there any plans to support multiple types with the same name, but with a different number of type parameters, like this (similar to the Func<T>
type in C#)?
interface Func<TResult> {
(): TResult;
}
interface Func<T1, TResult> {
(value: T1): TResult;
}
// ...
The current error message says that "all declarations of an interface must have identical type parameters".
Or, with #1616:
type Func<TResult> = () => TResult;
type Func<T1, TResult> = (value: T1) => TResult;