One Pager Cheat Sheet
- TypeScript is a
supersetof JavaScript developed by Microsoft, that provides extra features to allow for more powerful and efficient coding. - TypeScript provides an advantageous feature of
Static Typingthat helps to detect type-related bugs atcompile timewhile this wasn't possible in JavaScript untilruntime. - TypeScript
adds static typingto JavaScript, which allows fortype-related bugsto be detected atcompile timerather thanruntime. - TypeScript's
interfacesprovide 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 toolthat 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
TypeScriptcan beextendedin a few different ways, allowing for the implementation ofmultiple interfacesor theexpansionof an existing one for greater flexibility. - TypeScript offers native support for
enums, which makes defining them easier and more readable thanObject.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 optionforsmall to medium-sized projectsdue to itsquick prototyping and debuggingfeatures and lack oftranspilation, but the future of the language is still uncertain. - You cannot simply change the extension of a JavaScript program to
.tsin order to make it run as TypeScript, as the two languages differ substantially in terms of syntax and features.


