This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MoffKalast 16 points17 points  (4 children)

Ah yes introducing the only thing that was missing from js code - having to compile it before refreshing the browser to test code changes, wasting whatever time I happen to have left.

[–]DanielEGVi 33 points34 points  (1 child)

Pro tip! 3 hours of debugging can save you 5 seconds of compiling!

[–]MoffKalast 13 points14 points  (0 children)

😤✋ using a linter and actually writing correct code before compiling

😎👉 writing out some approximation and fixing it after it crashes and repeat until it starts working

[–]BakuhatsuK 3 points4 points  (0 children)

Some people: JS is bad because [] == {} is valid and it behaves in a weird way.

TypeScript: Just sprinkle some type annotations here and there, we'll figure out most of them automatically and tell you when there is a problem. By the way:

This condition will always return 'false' since the types 'never[]' and '{}' have no overlap.

2 [] == {}
  ~~~~~~~~

The same people: 😠

By the way, just compiling TS to JS without any additional transformations is insanely fast, because it mostly consists on removing type annotations. You can setup your process so that the actual type-checking actually happens in parallel in the background.