Typescript allows adding of static type definitions. It works by checking types and its assignments, lowering the chance of bugs.
Typescript checks a program for errors before execution. This is called static checking. TS can also determine an error based on the kinds of values being operated on, which is known as static type checking.
This allows for highly productive development with possibilities for less bugs and easily detect errors statically.