Suggestion: `throws` clause and typed catch clause · Issue #13219 · microsoft/TypeScript
The typescript type system is helpful in most cases, but it can’t be utilized when handling exceptions. For example: function fn(num: number): void { if (num === 0) { throw "error: can't deal with ...
GitHub