Closed
Description
Prior Art
It's really a shame TypeScript has no support for throwing.
I gave this a thumbs up: microsoft/TypeScript#13219
Thoughts on (I'm thinking we could do this later since we have a lot of throw around) using a sort of DocBlock syntax with @throws? Similar to the example in this issue: microsoft/TypeScript#43528
We could also consider (at a later date, not in this PR) not using throw at all in our codebase and always returning something like Rust's Result.
Context: #3760 (comment)
Solution:
- either document functions with
@throws
like this example - create a new ReturnType like
Result
in Rust - upvote this issue