Hacker News new | ask | show | jobs
by pjgalbraith 1810 days ago
Strongly agree. Typescript is fantastic and extremely expressive.

I recently had to take over development of a fairly large legacy application and the first thing I did was convert the core of it to Typescript, that process uncovered a lot of bugs around handling of input/output especially lack of null/undefined checking. Typescript replaces a lot of the effort that used to spent on JSDoc type annotations and unit tests (of course tests are still required but it reduces the scope of possible input from any possible type to a smaller subset).

One thing that works really well with Typescript codebases is to push the untyped code (such as legacy libraries) and input validation to the edges of the application, and ensure the core is fully type safe.