-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Closed
Labels
choreRelated to maintenance or clean upRelated to maintenance or clean upenhancementSome improvement that isn't a featureSome improvement that isn't a feature
Milestone
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
Metadata
Metadata
Assignees
Labels
choreRelated to maintenance or clean upRelated to maintenance or clean upenhancementSome improvement that isn't a featureSome improvement that isn't a feature