3 ms·
Does oneOf not cover it?
by dmcg 9y ago
Does oneOf not cover it?
- willtim 9y agooneOf looks like it could be used to encode sum types together with a custom string tag, but that's not the first class treatment that records get.
- henryluo 9y agoMark (https://mark.js.org https://mark.js.org) is a new notation that extends JSON with a type-name, which can be a more structured way to encode type info, instead of using custom string tag.