Y
Hacker News
new
|
ask
|
show
|
jobs
by
dmcg
3038 days ago
Does oneOf not cover it?
1 comments
willtim
3038 days ago
oneOf 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.
link
henryluo
3025 days ago
Mark (
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.
link