Skip to content

Commit f07b8f6

Browse files
code
1 parent 0b3d4b4 commit f07b8f6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Only the `catch (error) {}` block represents actual control flow, while no progr
2323
- [Try/Catch Is Not Enough](#trycatch-is-not-enough)
2424
- [Caller's Approach](#callers-approach)
2525
- [What This Proposal Does Not Aim to Solve](#what-this-proposal-does-not-aim-to-solve)
26-
- [Strict Type Enforcement for Errors](#strict-type-enforcement-for-errors)
26+
- [Type-Safe Errors](#type-safe-errors)
2727
- [Automatic Error Handling](#automatic-error-handling)
2828
- [Try Operator](#try-operator)
2929
- [Expressions are evaluated in a self-contained `try/catch` block](#expressions-are-evaluated-in-a-self-contained-trycatch-block)
@@ -169,11 +169,15 @@ Breaking compatibility is unacceptable for platforms like Node.js or libraries.
169169

170170
## What This Proposal Does Not Aim to Solve
171171

172-
### Strict Type Enforcement for Errors
172+
### Type-Safe Errors
173173

174-
The `throw` statement in JavaScript can throw any type of value. This proposal does not impose nor proposes any kind safety on error handling.
174+
The `throw` statement in JavaScript can throw any type of value. This proposal does not impose nor proposes any kind safety around error handling.
175175

176-
For more information, see [microsoft/typescript#13219](https://github.com/Microsoft/TypeScript/issues/13219). _(This also means no generic error type for the proposed [Result](#result-class) class)_
176+
- No generic error type for the proposed [Result](#result-class) class will be added.
177+
- No catch branching based on error type will be added. See [GitHub Issue #43](https://github.com/arthurfiorette/proposal-try-operator/issues/43) for more information.
178+
- No ways to annotate a callable to specify the error type it throws will be added.
179+
180+
For more information, also see [microsoft/typescript#13219](https://github.com/Microsoft/TypeScript/issues/13219). _()_
177181

178182
### Automatic Error Handling
179183

0 commit comments

Comments
 (0)