By using enums and specific types for the supported primitives, Constraint could be represented better. It's a bit messy because some constraints take a Number | Boolean, others String | Number, and then there's RangeInclusive<Number>...
Since the glib-serde dep is currently only used by Constraint's serde impls, so it could be removed as a core dep! (this now uses LuaVariant, which it won't need anymore once the above rework is completed)
By using enums and specific types for the supported primitives,
Constraint
could be represented better. It's a bit messy because some constraints take aNumber | Boolean
, othersString | Number
, and then there'sRangeInclusive<Number>
...Since the(this now usesglib-serde
dep is currently only used byConstraint
's serde impls, so it could be removed as a core dep!LuaVariant
, which it won't need anymore once the above rework is completed)