Introduction
In this article, I will give an overview of TypeScript and why we should go for TypeScript along with a few code examples to understand the basics of TypeScript.
What is TypeScript?
TypeScript is an open-source language developed and maintained by Microsoft. TypeScript is a superset of JavaScript that will compile to JavaScript.
TypeScript is a powerful language that provides you OOPS-style syntax. It supports objects, classes, inheritance, polymorphism, strongly-typed, etc. So, it is very useful for developers to write their code in a fast and easy way.
Why should we use TypeScript?
- TypeScript is an open source and easy to learn.
- It simplifies JavaScript code and makes it easier to write the code.
- Easy to understand and more readable code.
- It supports object-oriented programming style concepts.
- Developers can do development very fast using TypeScript so it will save the development time.
- It is used with Angular in most of the development.
- It supports intelligence for code writing.
As per Wiki version history -
|
Date
|
Version
|
|
Year-2012
|
0.8
|
|
Year-2013
|
0.9
|
|
Year-2014
|
1.0 with Visual Studio 2013 built-in support
|
|
Year-2017
|
2.2 Many other features
|
|
Year-2018
|
3.0, 3.1, 3.2
|
|
Year-2019
|
3.3, 3.4,3.5 (latest released in May 2019)
|
Environment Set up
- Install Node.js Click Here.
- Once Node is installed, then via npm, install the TypeScript.
- Go to the command prompt and type the following.

- Once TypeScript is installed successfully, we can check the TypeScript version using the below command.
Overview of TypeScript
Let us learn the following elements of TypeScript one-by-one.
- Variable
- Data Types
- Class
- Constructor
- Interface
Here, I will compare some of the things with C# so it will be easy to understand and remember for a new learner.
Variable in TypeScript
As we can declare our variable in JavaScript, the same way, TypeScript uses the variables like - let, var, and const. The variable name is case-sensitive in TypeScript.
Example of Variable declaration in TypeScript
- let firstName : string = “Jignesh”;
- var lastName : string = “Kumar”;
- const mum : number =10;





Bidyasagar MishraPosted Jul 29, 2019, 9:52 PM
Is typescript equivalent to ecma script?