I am trying to use a common set defined in a generic class definition:
type Foo<T : BoundType> = {
bar : T
}
class Class<F : Foo<T : BoundType>> {
method(arg : T) { ... }
}
Stream complains about syntax Class<F : Foo<T : BoundType>>
Is there a way to use the type T used in Foo in the class? The following works, but I'm trying to remove the need to repeat the type twice:
type Foo<T : BoundType> = {
bar : T
}
class Class<T : BoundType, F : Foo<T>> {
method(arg : T) { ... }
}
let x = new Class<ConcreteType, Foo<ConcreteType>>;
source
share