TypeScript Essentials

TypeScript Essentials

Anji…
TechMonks
Published in
2 min readJun 24, 2019

--

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 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

Originally published at http://techmonks.org on June 24, 2019.

--

--

Anji…
TechMonks

Technology Enthusiast, Problem Solver, Doer, and a Passionate technology leader. Views expressed here are purely personal.