Right now, ComparableType is a brand that custom data types must have, to declare that we can use comparison operators on them. This is less-than-ideal.
It would be nice to use declaration merging instead,
type ComparableType = BuiltInValueExpr | ComparableTypeDecl[keyof ComparableTypeDecl];
/*
Use declaration merging here
*/
interface ComparableTypeDecl {}
Right now,
ComparableType
is a brand that custom data types must have, to declare that we can use comparison operators on them. This is less-than-ideal.It would be nice to use declaration merging instead,