Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ivanjermakov
87 days ago
|
parent
|
context
|
favorite
| on:
TypeScript 6.0 RC
That's intentional, TS types are erased in runtime. My go-to way for this is discriminated unions:
https://www.typescriptlang.org/docs/handbook/unions-and-inte...
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: