Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 811 Bytes

document2.md

File metadata and controls

32 lines (23 loc) · 811 Bytes

What is TypeScript?

  • TypeScript is a superset of JavaScript created by Microsoft.

  • Allows static strick typing

  • Extra features - interfaces, enums, tuples, generics

  • Support modern features (arrow functions, let, const)

  • Based on the .NET harmony specification

What's wrong with JavaScript

  • Not suitable for large applications
  • Lacks strong typing
  • Weird inheritance, unfamiliar syntax
  • Only errors during runtime
  • Suffers type coercion

Benefits of TypeScript

  • TypeScript = JavaScript
  • Compiles to JavaScript - run everywhere
  • Familiar OO programming
  • New Features work everywhere

Environment setup

  • Install Node.js in your machine
  • Install TypeScript compiler using
    • npm npm i -g typescript
    • yarn yarn global add typescript

Editor setup and compilation