Hacker News new | ask | show | jobs
by bilalq 1709 days ago
You pretty much always have to define your record type with `| undefined` tacked on to the value type parameter. With that, the problem mostly goes away.
2 comments

What's the point of typing things if you have to constantly typecheck them anyway?
Yeah, but I use libraries that don’t do that, and have teammates that don’t care about this