Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
rideg
on Sept 20, 2022
|
parent
|
context
|
favorite
| on:
Learn how to unleash the full potential of the typ...
You can use type guards for something similar:
https://www.typescriptlang.org/docs/handbook/advanced-types....
brundolf
on Sept 20, 2022
|
next
[–]
What they were getting at is that you can't observe T itself, only values passed in as type T
323
on Sept 20, 2022
|
prev
[–]
Keyword similar. I use type guards for other things (like typing JSON responses), but they can't solve this particular problem.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: