Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
mikeryan
on Oct 12, 2021
|
parent
|
context
|
favorite
| on:
Tricks I wish I knew when I learned TypeScript
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: