Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

TypeScript has been great. With plain JavaScript you have to be outstandingly organized and diligent to maintain any sort of medium to large project. But this part of the process tends to get neglected, and eventually a point is reached where you can either a) break stuff at run-time in unpredictable ways, b) stop refactoring and deal with the consequences, or c) have a proper suite of unit tests. c) requires almost as much discipline as keeping the code clean in the first place, and a) or b) are not great options.

Luckily TypeScript helps out quite a lot and basically for free. Converting an existing JavaScript project to "naive" TypeScript takes hardly any effort, and as the project evolves it is easy to add type annotations and interfaces at any pace. Once a module is properly typed it (almost) stops breaking at run-time, yay! It's also very clear what will be executing in the browser. Using a cross-compiled language that follows the principle of least astonishment is a real treat.

Obviously it can't prevent compile-time errors, generate unit tests, or build a good application for you, but you do get quite a lot of help with the problems it can solve.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: