6 ms·
Typical provides "asymmetric" fields to assist with evolution of types: https://github.com/stepchowfun/typical#asymmetric-fields-can-safely-be-promoted-to-requ
by oftenwrong 3y ago
Typical provides "asymmetric" fields to assist with evolution of types:
https://github.com/stepchowfun/typical#asymmetric-fields-can-safely-be-promoted-to-required-and-vice-versa https://github.com/stepchowfun/typical#asymmetric-fields-can...
>To help you safely add and remove required fields, Typical offers an intermediate state between optional and required: asymmetric. An asymmetric field in a struct is considered required for the writer, but optional for the reader. Unlike optional fields, an asymmetric field can safely be promoted to required and vice versa.
- skybrian 3y agoYeah, it only works for migrations in fairly closed systems where you can upgrade or delete all the old data, though.