Closed samhh closed 2 years ago
We don't need values for constructors which are nullary. We do still need the keys in some form however due to the use of Proxy in the main lib. Sum types with all-nullary constructors could benefit from a terser input sans codecs.
Proxy
What we have now:
getCodecFromSerialized<MySum>({ MemberA: t.undefined, etc })
What we could do:
getCodecFromSerializedNullary<MySum>(['MemberA', etc])
We don't need values for constructors which are nullary. We do still need the keys in some form however due to the use of
Proxy
in the main lib. Sum types with all-nullary constructors could benefit from a terser input sans codecs.What we have now:
What we could do: