AnyhowStep / tsql

A SQL query-builder/ORM
37 stars 3 forks source link

Investigate better implementation of `ComparableType` #210

Closed AnyhowStep closed 4 years ago

AnyhowStep commented 4 years ago

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 {}