TypeScript

Typescript Basic

Introduction Random notes about TypeScript What is TypeScript? TypeScript is a typed superset of JavaScript meaning TypeScript is JavaScript’s runtime with a compile-time type checker. It preserves the runtime behavior of JavaScript meaning you can move code from JavaScript to TypeScript even if that the code has type errors. Declarations var: declares a variable let: block-scoped local variable const: block-scoped, read-only named constant Examples Scope Difference: function varExample() { if (true) { var x = 10; } console.