TypeScript is an open-source, object-oriented language developed and maintained by Microsoft, licensed under Apache 2 license.
Official website: https://www.typescriptlang.org
Source code: https://github.com/Microsoft/TypeScript
TypeScript Version History
|TypeScript 0.8||October 2012|
|TypeScript 0.9||June 2013|
|TypeScript 1.0||October 2014|
|TypeScript 2.0||September 2016|
|TypeScript 3.0||July 2018|
|TypeScript 4.0 - latest release||August 2020|
The type system increases the code quality, readability and makes it easy to maintain and refactor codebase. More importantly, errors can be caught at compile time rather than at runtime.
How to use TypeScript?
TypeScript code is written in a file with
A TypeScript file can be written in any code editor. A TypeScript compiler needs to be installed on your platform. Once installed, the command
- Object-Oriented Language: TypeScript provides powerful features such as Classes, Interfaces, and Modules. You can write pure object-oriented code for client-side as well as server-side development.
- Static type-checking: TypeScript uses static typing. This is done using type annotations. It helps type checking at compile time. Thus, you can find errors while typing the code without running your script each time. Additionally, using the type inference mechanism, if a variable is declared without a type, it will be inferred based on its value.
- ES 6 Features: TypeScript includes most features of planned ECMAScript 2015 (ES 6, 7) such as class, interface, Arrow functions etc.
- TypeScript is an open-source language with continuous development and maintenance by Microsoft.
- TypeScript is also closer in syntax to backend languages like Java and Scala. This helps backend developers write front-end code faster.
- TypeScript has easy integration with task runner tools like Grunt and Gulp to automate the workflow.