Issues with type variables
the type
data Range a = Range
{ min :: a
, max :: a
}
generated with this type
Range (TSGenericVar "a")
creates the following typescript
// Defined in ...
export interface Range<A,A> {
// readonly tag: "Range";
readonly min: A;
readonly max: A;
}
Furthermore, When trying to use a [Range <some-type>]
, the generated code is
export interface SomeInterface {
// readonly tag: "SomeInterface";
...
readonly someAttribute: Array<Range>;
}
Edited by Mason Mackaman