Mark As Completed Discussion

One Pager Cheat Sheet

  • TypeScript is a superset of JavaScript developed by Microsoft, that provides extra features to allow for more powerful and efficient coding.
  • TypeScript provides an advantageous feature of Static Typing that helps to detect type-related bugs at compile time while this wasn't possible in JavaScript until runtime.
  • TypeScript adds static typing to JavaScript, which allows for type-related bugs to be detected at compile time rather than runtime.
  • TypeScript's interfaces provide type-checking and are used for declaring types, function types, and array types, but are not transformed into JavaScript during transpilation.
  • Interfaces in TypeScript are a type-checking tool that allows developers to specify the structure of data expected and create better, more robust code.
  • TypeScript's generics and optional parameters allow developers to create type-safe code, while also allowing them to specify which parameters are optional.
  • Interfaces in TypeScript can be extended in a few different ways, allowing for the implementation of multiple interfaces or the expansion of an existing one for greater flexibility.
  • TypeScript offers native support for enums, which makes defining them easier and more readable than Object.freeze()'d key-value pairs in JavaScript.
  • The challenge of using TypeScript is its learning curve and transpilation time, which makes it unsuitable for small or medium sized projects or for existing JavaScript projects; however, the availability of resources is increasingly helpful.
  • TypeScript, with its type safety and predictability, is a great language to build modern web applications, and is the second most used language according to the StackOverflow developer's survey.
  • JavaScript is the best option for small to medium-sized projects due to its quick prototyping and debugging features and lack of transpilation, but the future of the language is still uncertain.
  • You cannot simply change the extension of a JavaScript program to .ts in order to make it run as TypeScript, as the two languages differ substantially in terms of syntax and features.