With TypeScript your IDE or Text Editor can be setup in such a way to allow for easy hinting to display property types, return types, and comments. This increases productivity so that a fellow developer doesn’t have to find the documentation for the library or class that they are using or have to look at any source code to determine what is required and what the expected output is. When working within teams where many developers are working on multiple services this ability to quickly show each other all the types is invaluable.
Take the following screenshots:
With TypeScript and a plugin with your favorite IDE or Text Editor such as WebStorm, VSCode, Sublime Text, Atom, etc; we can show available class or properties found within an external module, view class constructor properties and return types, and view class properties and methods. You can also add any documentation about the properties or methods by adding simple comments within the module.
This ability to show module classes and class properties and methods also extends outside of your teams code base. Using a popular npm module Typings you can download definition files for your favorite libraries such as JQuery and then have access to that libraries type definitions.