Understanding the need for TypeScript file in Angular2 applications.
Overview
TypeScript is a free and open-source programming language developed and maintained by Microsoft.TypeScript is an open-source programming language developed and maintained by Microsoft. It is a strict syntactical superset of JavaScript, and adds optional static typing to the language. Anders Hejlsberg, lead architect of C# and creator of Delphi and Turbo Pascal, has worked on the development of TypeScript. TypeScript may be used to develop JavaScript applications for client-side or server-side (Node.js) execution. On visiting the TypeScript website https://www.typescriptlang.org/ we see the following screen.
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
This compiler which converts typescript file to Javascript is called a Transpiler. So if this is the case why can't users directly write in JavaScript instead of TypeScript which also compiles to JavaScript.
Need for TypeScript-