Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the example is a bit contrived with a preset union. Where it’s really valuable is when you’re extracting a union from another source (like via keyof) and want to keep the two objects in sync without having to modify the keys in two places.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: