Type script


Why TypeScript

JavaScript is a powerful and widely used programming language, but it has a dynamic typing system, which means variable types are determined at runtime. While dynamic typing provides flexibility, it can lead to runtime errors that are challenging to catch during development.

What Typescript

In response to these challenges, Microsoft introduced TypeScript, a superset of JavaScript that adds static typing to the language. TypeScript is designed to address some of the limitations of JavaScript by providing developers with a more robust type system.

How Typescript

  1. Static Typing:
  2. Compatibility with JavaScript:
  3. Tooling Support:
  4. Enhanced IDE Experience:
  5. Interfaces and Type Declarations:
  6. Compilation:

Execution of TypeScript Code


TypeScript code doesn't run natively in browsers or JavaScript environments. Instead, it undergoes a compilation process to generate equivalent JavaScript code. Here's an overview of how TypeScript code is executed:

  1. Writing TypeScript Code:
  2. TypeScript Compiler (tsc):