The typed JavaScript language that brings extra documentation with the code that you write. Typed, so writing code requires extra thought, which in turns creates well thought out, cleaner code.
Starting a new project with TypeScript
When writing code in typescript, the begining is the hard part; you have the create the foundations of the application you expect to build. Similarly to how you would write a program using Test Driven Development. TDD and Typescript can work harmoniously.
With typescript you end up creating a well documented program that tells you exactly what the program is doing and what each function expects as inputs and outputs. This is essential for maintaining the system, and provides great documentation to collaborate with others.
I believe TypeScript should be learnt as a fundamental scripting language, it forces you to understand how the code actually works, understanding what the library functions expect as inputs and outputs,and how they should be correctly be used.
You can imagine that this creates a brilliant onboarding process for a new collaborator. The collaborator does not need to do so much foundation building, they can get right onto extending the existing system. They will know what the system can do with the typed documentation.
The typed documentation is so good that it is possible to auto-generate a beautiful PDF of documentation of the code with links to each connected component and laid out superbly with very little work. This is done via Typescript’s TSDoc.
Picking up TypeScript
TypeScript is an extension of JavaScript, and therefore should be familiar and easy to pick up if you are used to JavaScript. The learning curve should be lean. And if you are from a typed language, it should be a breeze to understand the code base.
If you know JavaScript, you already know TypeScript.
When you write TypeScript you are writing modern, standard compliant javascript.
Integrating typescript to an existing code base is not too challenging. You can adopt TypeScript at your own pace, using as much or as little of TypeScript as you want, you can set your compiler to only reach some files. TypeScript gets translated to normal javascript at the end anyway. There is a smooth transition that doesn't impede development. You do not have to convert the entire codebase to TypeScript all at once.