The Typescript was implemented by Microsoft and the first version (0.8) of TypeScript was released in October 2012. Same as other object-oriented languages such as c#, java, etc. the typescript also offers classes, interfaces, access modifiers, etc. to build robust components.
Generally, we will write the TypeScript code in a file with
.ts extension and the typescript compiler (TSC) will compile and convert
tsc filename.ts command like as shown below.
tutlane.js) can be included in HTML code and that will be executed by any browser.
var test = "Hello world";
test = true;
test = 1001;
test = undefinded
test = ['A','B', 'C']
If you observe the above code, we defined
test variable and we are able to assign the values of different data types such as string, number, Boolean, etc. due to this, it’s difficult to maintain the large scale applications when other team members also working on the same code.
TypeScript is a strict type checking language so the compiler will associate the type to the variable at the time of variable initialization based on the value or defined type.
For example, in TypeScript the compiler will assign the
string type to the following variable based on the assigned value.
let test = 'Welcome to Tutlane';
The strict type system will help us to improve the code readability and find the errors at the compile time itself.
The following are the advantages of using TypeScript in our applications.
The following are the important features of TypeScript.
The TypeScript was developed and maintained by Microsoft under the Apache 2 license. The first version (0.8) of TypeScript was launched in October 2012 under the lead of Anders Hejlsberg who is the creator of c#. Now, the latest version of TypeScript is 3.7 which was released in November 2019.