TypeScript Development Experience
With TypeScript, we have more depth to things like autocomplete and linting. With types, we can also verify if incorrect values are passed, and your editor can warn you long before you try to run the application. The autocomplete can provide you with the value type a particular property contains, what types of values a method accepts, and what types a method returns.
While this is my opinion, adding TypeScript to your project is a way to establish an additional level of context for your code when someone else tries to read it. It can act like a contract between code blocks about what is allowed and in what way it should be used, thus helping reduce cognitive learning required to use the code and reduce the errors.
Adding TypeScript to your editor/IDE
I use Atom, and the atom-typescript package is the best option. I can’t recommend it enough.
If you use Code TypeScript is built in. No plugins or configuration are required.
A few other options are listed at the Typescript site.
- Using TypeScript with Angular Part 1: Stronger Typing
- Using TypeScript with Angular Part 2: ES6 and Transpiling