TypeScript Pocket Guide

JavaScript is a high-level, interpreted, dynamically typed language for adding client-side interactivity to websites (visual effects, animations, interactive forms, pop-ups, dropdown menus…). It is multi-paradigm, supporting procedural, functional, and object-oriented styles, with inheritance based on prototypes rather than classes.

TypeScript is a statically typed superset of JavaScript that that adds type annotations, interfaces, and compile-time checks. It transpiles to JavaScript, enabling early error detection and improved tooling without altering runtime behavior. Unlike compilation to machine code, transpilation keeps the output in the same language family, just a different version or dialect

Advantages of TS: improves code maintainability through interfaces, enums, and generics, and supports advanced tooling like autocompletion, refactoring, and real-time feedback in IDEs.

TypeScript History & Conventions

TypeScript was first released as version 0.8 in October 2012 by Microsoft, led by Anders Hejlsberg—the architect behind C#, Delphi and Turbo Pascal.

Naming Conventions

This superset of JavaScript enables us to define types for variables, function parameters, and return values, which enhances code readability and maintainability. While it is often advised to learn TypeScript after having a strong understanding of JavaScript, which may be true to a certain extent. However, as TypeScript is a superset of JavaScript, and in order to keep this course as simple as possible, I will exclusively focus on TypeScript, as all JavaScript concepts will apply.

1. TypeScript Basics


2. TypeScript Data Types



4.3. TypeScript Conditions


TypeScript Conditionals: Double (==) vs Triple (===) Equality


4.3. TypeScript Functions


In TypeScript, functions are a core feature for writing reusable and maintainable code.


4.4. TypeScript Classes


TypeScript object oriented.


4.5. TypeScript DOM Manipulation