Narrowing Unions Without a Single Type Assertion
Discriminants, type guards, and the satisfies operator doing the work for you.
👍 3
·
💬 10
4 posts —
Types that catch real bugs without slowing you down.
Showing 4 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.
Six confusing compiler errors and what each one is really telling you.