Nitzan Tomer

Results 10 comments of Nitzan Tomer

@DanielRosenwasser Yes, users won't be forced to catch exceptions, so this is fine with the compiler (at runtime the error is thrown of course): ``` function fn() { throw "error";...

@aleksey-bykov You're suggesting not to use `throw` at all in my code and instead wrap the results (in functions that might error). This approach has a few drawbacks: - This...

@aleksey-bykov My point with `JSON.parse` might throwing `SyntaxError` is that I need to look the function up in the docs just to know that it might throw, and it would...

@aleksey-bykov Developers should be aware of the different js issues you described, after all adding `throws` to typescript doesn't introduce anything new to js, it only gives typescript as a...

@gcnew Oh, I'm well aware of that as I spent more than a few hours trying to figure out what went wrong. But with the ability to do so now...

@gcnew This is how it's done in C#, the problem is that docs aren't as standard in typescript. I do not remember coming across a definition file which is well...

@HolgerJeromin Why would it be needed?

@aleksey-bykov This: ``` function mightThrow(): void { if (Math.random() > 0.5) { throw 'hey!'; } } function dontCare() { return mightThrow(); } ``` Means that both `mightThrow` and `dontCare` are...

@aleksey-bykov So you propose that all errors must be handled like it is with java? I'm not a fan of that (even though I come from java and still loving...

@aleksey-bykov I don't see why any of the cases you listed render this proposal as inviable. There's no problem with handling an error that was thrown way down the invocation...