Introduction to TypeScript

Reading Time: 2 minutes

This is a part of a TypeScript series of blog posts. If you haven’t read about the TypeScript introduction, you can read it here

Majority of client-side languages adopting the TypeScript. It greatly helps to reduce the JavaScript issues in development phase.

TypeScript got much attention from the developers once angular adopts it.

TypeScript was publicly made available on October 2012 by Microsoft.

What is Typescript?

Typescript is a typed superset of JavaScript. Typescript compiles to plain JavaScript and adds optional static type checking and class-based object-oriented programming to the language.

In short, Typescript provides the Type and object-oriented capabilities to the JavaScript. By having optional type checking, Typescript guarantees that the code will run as expected in all the circumstances. Object-oriented capabilities allow the programmers to think in an object oriented way which in turns improves the developer speed and code maintenance.

Note: To understand the TypeScript fully, developers need to have basic understanding on JavaScript and OOPs concepts

Key features

  • It works on any browser, any host (Node.js, Java), any OS and open source
  • Supports standard JavaScript
  • Static typing (optional)
  • Encapsulation through classes and modules
  • Support for interfaces
  • Arrow functions (lambda expressions in .NET)
  • Intellisense and syntax checking through IDEs
  • Improves maintainability of the code
  • LESS bugs as type checking is in place

What is Static type checking?

Static type checking allows you to define the datatypes for your variables, method parameters, method return values and object properties. The compiler will evaluate the program at compile time and report any syntactical issues are there in the program.

Typescript cannot be run or understandable by the browser. So that Typescript code is transpiled into the JavaScript.

Wait! What does it mean by transpilation or what is transpiler?

Transpilation is a process converting the code from one language into other languages. Transpilers are source to source compilers.

Below is the series of blog posts about type script.

TypeScript Introduction
TypeScript DataTypes
TypeScript Classes and Interfaces
TypeScript Modules

0 0 vote
Article Rating