Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
acdibble
on March 16, 2023
|
parent
|
context
|
favorite
| on:
TypeScript 5.0
This is possible with type predicates, example:
https://www.typescriptlang.org/play?#code/C4TwDgpgBAYg9nKBeK...
docs:
https://www.typescriptlang.org/docs/handbook/2/narrowing.htm...
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
docs: https://www.typescriptlang.org/docs/handbook/2/narrowing.htm...