re: Practical Ways to Write Better JavaScript VIEW POST

TOP OF THREAD FULL DISCUSSION
re: TS types are really bad, you should need to do stuff like: let foo: number = 42 if (foo > 100) { throw_error_too_big(); }; if (foo < 0) ...
 

I’m sorry but this is a really weak argument for Typescript having a bad type system. This is already a feature that is planned for TS too.

Also your code is not optimal TS and could be condensed to a single line.

code of conduct - report abuse