What is TypeScript and use cases of it?

TypeScript is a strongly typed, object oriented, compiled language. It was designed by Anders Hejlsberg (designer of C#) at Microsoft. TypeScript is both a language and a set of tools. TypeScript is a typed superset of JavaScript compiled to JavaScript. In other words, TypeScript is JavaScript plus some additional features.

  • TypeScript is an open-source language which builds on JavaScript, one of the world’s most used tools, by adding static type definitions.
  • Types provide a way to describe the shape of an object, providing better documentation, and allowing TypeScript to validate that your code is working correctly.
  • All valid JavaScript code is also TypeScript code.
  • TypeScript code is transformed into JavaScript code via the TypeScript compiler or Babel.

What is TypeScript and why use it?

For a large JavaScript project, adopting TypeScript might result in more robust software, while still being deployable where a regular JavaScript application would run.

TypeScript simplifies JavaScript code, making it easier to read and debug. TypeScript is open source. TypeScript provides highly productive development tools for JavaScript IDEs and practices, like static checking. TypeScript makes code easier to read and understand.

What is difference between JavaScript and TypeScript?

TypesScript is known as Object oriented programming language whereas JavaScript is a scripting language. TypeScript gives support for modules whereas JavaScript does not support modules. TypeScript has Interface but JavaScript does not have Interface.

Who uses TypeScript?

“By choosing TypeScript, we might end up being locked with some legacy tool, that nobody will support in the future” TypeScript is at the moment used by Microsoft, Asana, Lyft, Slack, all Angular 2+ developers, multiple React & Vue. js developers, and thousands of other companies.

Reference

  • https://en.wikipedia.org/wiki/TypeScript
  • https://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript
Rajesh Kumar