Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
theogravity
18 days ago
|
parent
|
context
|
favorite
| on:
`satisfies` is my favorite TypeScript keyword (202...
The second example confuses me. The Person type has isCool: boolean, not an explicit true. How does using satisfies here pass coolPeopleOnly?
auxiliarymoose
18 days ago
[–]
You can sorta think of `satisfies Foo` as "the type is exactly the literal value, but also make sure the value could be used in the place of a Foo"
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: