Why typescript

  • typescript adds types => helps to build less error prone application.
  • we can write next generation javascript features (compiled down for older browsers)
  • we can write non javascript features like interfaces or generics.
  • Meta-programming features like decorators.
  • Rich Configuration options.

Notes

  • javascript is dynamically typed(resolved at runtime) which means it is perfectly fine if we have variable that initailly hold number and we later assign string to it.
  • typescript is statically typed(set during development) that means we get error in development time when we try to change the type of the variable. so we are forced to be clear about the types.