Rust-like Error Handling in TypeScript

6 points by csomar


nemin

TypeScript typing is genuinely hard. It's easy to end up in a codebase where half your types are any and unknown, which defeats the point.

Does this really happen that often? Admittedly I only have my code and my workplace's codebase as measurements, but I can't think of more than a handful times I had to use unknown and practically none where I had to use any.