Closed sigmasoldi3r closed 3 years ago
Ahh, that blog post is located at https://abby.how/quick/manipulating-records-in-amulet.html now. Woops, I'll update those links.
To answer your question, there's no intersection types in Amulet (as that implies subtyping). Instead you can do something like this:
type file <- { readAll : () -> string }
type response <- { file | anything : () -> string }
Links should now be fixed :).
I've been looking for the Records can be extended using magic.↩︎ at https://amulet.works/tutorials/01-intro.html but the link is broken.
What is the current way to achieve it? There are join types like in Typescript?