Signup/Sign In
PUBLISHED ON: AUGUST 25, 2021

TypeScript Introduction

TypeScript is a strongly typed superset of JavaScript which was developed by Microsoft in 2012 under the license of Apache 2.

It is an open-source, pure object-oriented programming language. It contains all the elements of JavaScript and compiles to plain JavaScript.

TypeScript is basically designed for large-scale Javascript application development. It is platform-independent and can be executable on any web browser, host, and operating system.

The typeScript is both a language and also a set of tools. It is the ES6 version of JavaScript with some additional features.

We can write the TypeScript code on any code editor, and we just have to download the TypeScript compiler to compile the code. First, we have to write the TypeScript code in the IDE and save it with .ts extension and then compile it into JavaScript using the TypeScript compiler.

The TypeScript uses the JavaScript syntax and adds additional syntax for supporting types. Any JavaScript program without any syntax error can be a TypeScript program.

This functionality is very useful if we want to migrate the JavaScript code into TypeScript.

Advantages of TypeScript

  • TypeScript points out the errors at the compile-time, whereas JavaScript points out the error at run time.
  • It supports strong types or static typing.
  • It is platform-independent and can be executed on any browser.
  • TypeScript supports the namespace concept while defining a module.

Disadvantages of TypeScript

  • TypeScript takes more compilation time as compared to JavaScript.
  • It does not support abstract classes.
  • When we run the TypeScript application in the browser, a compilation step is required, which transforms the TypeScript into JavaScript.

TypeScript Versions

There are several versions of TypeScript, which are given below:

Versions Release Date Changes Added
0.8 1 October 2012 -
0.9 18 June 2013 -
1.0 12 April 2014 -
1.1 6 October 2014 Performance Improvement.
1.3 12 November 2014 protected modifiers and tuple types were added.
1.4 20 January 2015 union types, let and const declarations, template string, typed guard, and typed aliases were added
1.5 20 July 2015 ES6 modules, namespace keyword, for...of support, and decorators were added
1.6 16 September 2015 JSX support, intersection types, local type declarations, abstract classes and methods, user-defined type guard functions were added
1.7 30 November 2015 async and await support
1.8 22 February 2016 constraints generics, control flow analysis error, string literals types, and allowJS
2.0 22 September 2016 null- and undefined-aware types, control flow based type analysis, discriminated union types, type of, for, this functions, never type, and readonly keyword was added
2.1 8 November 2016 keyof and lookup types, mapped types, object spread, and rest
2.2 22 February 2017 mix-in classes and object type were added.
2.3 27 April 2017 async iteration, generic parameter defaults, and strict option
2.4 27 June 2017 dynamic import expressions, string enums, improved inference for generics, and strict contravariance for callback parameters were added
2.5 31 August 2017 optional catch clause variables were added
2.6 31 October 2017 strict function types were added
2.7 31 January 2018 constant-named properties and fixed-length tuples were added
2.8 27 March 2018 conditional types and improved keyof with the intersection, types were added.
2.9 14 May 2018 support for symbols and numeric literals in keyof and mapped object types.
3.0 30 July 2018 project references, extracting and spreading parameter lists with tuples
3.1 27 September 2018 mappable tuples and array types
3.2 30 November 2018 stricter checking for bind, call and apply
3.3 31 January 2019 relaxed rules on methods of union types, incremental builds for composite projects
3.4 29 March 2019 faster incremental builds, type inference from generic functions, readonly modifier for arrays, const assertions, and type-checking globalThis.
3.5 29 May 2019 faster incremental builds, omit helper type, improved excess property checks in union types, and smarter union type checking was added
3.6 28 August 2019 Stricter generators, more accurate array spread and better Unicode support for identifiers were added
3.7 5 November 2019 Optional Chaining and Nullish Coalescing were added
3.8 20 February 2020 Type-only imports and exports, ECMAScript private fields, and top-level await were added
3.9 12 May 2020 Improvements in Inference and Speed Improvements were added
4.0 20 August 2020 Variadic Tuple Types and Labeled Tuple Elements were added
4.1 19 November 2020 Template Literal Types, Key Remapping in Mapped Types, were Recursive Conditional Types added.

IDE and Editor Support

There are lots of IDEs are available that support TypeScript, out of which some are given below

  • Visual Studio Code
  • JetBrains
  • Atom
  • Cloud9 and Codenvy
  • NetBeans IDE
  • Eclipse IDE


About the author:
I am the founder of Studytonight. I like writing content about C/C++, DBMS, Java, Docker, general How-tos, Linux, PHP, Java, Go lang, Cloud, and Web development. I have 10 years of diverse experience in software development.