Throws keyword basically never coming to 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 …
Read more »