What is TypeScript
TypeScript is an open-source language developed and maintained by Microsoft Corporation.
The TypeScript source file is saved in “.ts” extension, which lets you run on any devices.
History of Typescript
Typescript was first made public in the year 2012.
After two years of internal development at Microsoft Corporation, the TypeScript 0.9, released in 2013.
An additional support for generics TypeScript 1.0 was released at Build 2014.
In July 2014, the new TypeScript compiler was released, which is five times faster then it’s the previous version.
In July 2015, TypeScript had provided the support for ES6 modules, namespace keyword, for, of support, decorators.
In November 2016, they added an new feature like key and lookup types, mapped types, and the rest.
On March 27, 2018, they improved conditional types and the improved key with intersection types supports added in the Typescript.
Features of TypeScript
- Typescript provides an optional static typing, classes, and Interface.
- TypeScript supports ES6.
- Transpiler offers the error-checking feature in TypeScript. You are allowed to focus on the errors on the coding before running the actual script on the compiler. This possible because it compiles the code during coding and produces compilation errors.
- With TypeScript, you can expect static type-checking. It is done at compile time. Anyone can locate errors while typing the code, so you need not wait until the actual execution of the code.
- For addition and removal of DOM element nodes, TypeScript could be useful and fast, whereas using JS, it can be painful.
However, it is not a complete coding language. As an interpreted programming language, JS comes inside a web browser’s context.
Typescript is compiled to JS, which can be employed for any JS code; therefore, TypeScript comes with more benefits, which makes it more commonplace and popular.
We also see more improvements with each release and amazing TypeScript features added with subsequent releases.