Narrowing Unions Without a Single Type Assertion
Discriminants, type guards, and the satisfies operator doing the work for you.
👍 3
·
💬 10
3 posts
Showing 3 posts
Discriminants, type guards, and the satisfies operator doing the work for you.
Validate untrusted input once at the boundary and let inference handle the rest.
A short screencast building a typed fetch helper one generic at a time.