
Install NodeJS and TypeScript, set up tsconfig with src and lib folders, and write index.ts. Compile with tsc watch, run node lib/index.js, and observe type annotations removed in JavaScript.
Explore how JavaScript classes and built-in types like array and set are annotated in TypeScript, and how generics apply to instance types such as queues and user-defined classes.
Explore TypeScript’s array shorthand by declaring element types with square brackets, enforce uniform types across arrays, and use tuples for fixed-length two-number points with compile-time checks.
Use type aliases to name the intent and represent a point in space, reducing duplication by reusing a common object shape with X and Y numbers.
Discover how const declarations in TypeScript prevent reassignment, catch initialization mistakes at compile time with type annotations for a point with X and Y, and still allow property mutations.
Annotate function parameters and return types in TypeScript, using void for no return value and rest parameters for multiple arguments, and explore shorthand function type syntax and type aliases.
Learn how TypeScript structural typing determines type compatibility by structure, not names, using examples of user, product, and 2D versus 3D points, including duck typing and compile-time checks.
Explore TypeScript classes, including constructors, properties, and methods like move, with public, private, and protected access modifiers, and extend a Bird class with a fly method.
Explore how the TypeScript compiler target option in tsconfig.json shapes emitted JavaScript, switching between ES5 compatibility and ES2015/ES6 class support, including private fields and WeakMap usage.
Explore generics in TypeScript by using a queue with a type parameter T to enforce that push and pop operations handle only items of the same type, preventing runtime errors.
Explore the any and unknown types in TypeScript, compare their behavior and safety, and learn when to bypass type checks versus when to enforce checks.
Learn how to migrate JavaScript to TypeScript by using any for quick fixes or unknown for safer refactoring, and apply runtime checks with typeof to guard values.
Boot a type-safe frontend react app with TypeScript using Create React App, configure tsconfig, and run a live development server with hot reload, build production assets, and serve static files.
Use the as keyword type assertions in TypeScript (not the angle bracket form for TSX) to tell compiler the value’s type when a function returns unknown, enabling string method calls.
Discover the distinction between type casting and type assertions in TypeScript, and learn to coerce a string to a number using JavaScript tricks like the plus operator, illustrating runtime coercion.
Export a palindrome utility from a file using the export keyword, then import it in another file via a relative path. TypeScript supports the full module syntax, including namespace imports.
Learn how TypeScript uses declaration files to add Node.js runtime typings, declare process, install @types/node, and enable type safety for fs and express in Node.js projects.
Initialize a TypeScript npm package, install TypeScript as a dependency, generate tsconfig with src and lib, enable source maps, declarations, and declaration map, then build and publish for IntelliSense use.
Learn to replace chained setTimeout calls with an async function and a delay promise that resolves after time, awaiting logs; TypeScript transpiles this to es5 for older browsers.
Learn to run TypeScript by compiling with npx tsc to JavaScript in a lib folder, then execute with node; use ts-node for on-the-fly execution and npm scripts like npm start.
Explore how the this keyword in JavaScript differs by calling context and lexical scope, and how arrow functions capture this to keep instance methods bound.
Learn how TypeScript's read only modifier prevents reassigning properties like X and Y after declaration, with compile time error checks and no runtime impact.
Learn how TypeScript unions enable functions to accept strings or string arrays using the pipe operator, enforce compile-time type safety, and improve readability with type aliases and multi-line unions.
Use literal types for strings, booleans, and numbers to constrain values with unions and type aliases, boosting autocomplete and catching compile-time errors, illustrated by cardinal directions and a dice example.
Explore type narrowing in TypeScript using typeof, instance of, and in checks to distinguish primitives, classes, and shapes like square and rectangle, ensuring compile time type safety in area calculations.
Explore discriminated unions in TypeScript by using a shared kind field with literal values to distinguish shapes like square, rectangle, and circle, enabling safe, type-aware code.
Explore class parameter properties in TypeScript, eliminating property duplication by declaring properties in constructor parameters using public, private, protected, or read only modifiers, which initializes from passed values.
Explore how the TypeScript strict compiler option enables comprehensive type safety by defaulting to true, affecting noImplicitAny, definite assignment, and runtime errors, with practical examples.
Identify and handle null and undefined in TypeScript using literal annotations, double equals checks, and type narrowing. Learn how strictNullChecks enforces distinct null and undefined types for safer code.
Explore intersection types in TypeScript, using the ampersand to combine 2D and 3D point shapes and create composite types for compile-time type safety.
Explore optional modifier in TypeScript, defining required and optional properties, handling undefined, and enabling optional class members, with compile-time checks and explicit null handling.
Explore TypeScript's non null assertion operator, a postfix exclamation mark, and how code flow analysis treats possibly null or undefined values.
Explore how type aliases and interfaces declare object structures, extend to 3D points, enforce compile-time errors, and leverage interface declaration merging for familiar hierarchies.
Learn how TypeScript interfaces support declaration merging by combining the base Express request with middleware-added properties like json and the body property into a single type.
Explore the choice between types and interfaces in TypeScript by modeling a UI input with an interface and a type alias, including text or email unions and primitive types.
Analyze TypeScript's never type, showing how it marks impossible paths like throws or infinite loops, and enforce shape handling in an area function with compile-time errors for unhandled cases.
Use the implements keyword in TypeScript to ensure classes like cat and dog satisfy the animal interface by providing name and voice, enabling safe utility functions.
Explore user defined type guards in TypeScript to distinguish square and rectangle shapes without modifying types, using isSquare and isRectangle to improve readability and type inference.
Learn how assertion functions in TypeScript narrow types by asserting conditions like not null and date, enabling safe access to a person’s name and date of birth.
Explore function overloading in TypeScript, declaring multiple signatures for string and string[] inputs to preserve correct return types, while a single implementation handles all cases at compile time.
Explore how TypeScript expresses function and constructor types using call signatures, type aliases, interfaces, and overloads, including a class Point with two members X and Y of type number.
Learn how to define and use abstract classes in TypeScript, extending a base command class with abstract members and implementing them in concrete commands like git reset and git fetch.
Explore how TypeScript index signatures let you access object members with string or number keys. Read, delete, and catch undefined risks and typos at compile time.
Learn how to prevent mutation with readonly arrays and tuples in TypeScript by copying arrays with splice, using readonly annotations, and returning new tuples instead of mutating input.
Learn how TypeScript's structural typing allows assigning a point 3D to a point 2D, and use double assertions via unknown to force cross-type assignments, with caution for migrating JavaScript.
Discover how const assertions in TypeScript infer literal types, enforce immutability, and fix errors by applying as const at the most specific point.
Use TypeScript's this parameter to type the calling context, ensuring this has a value member of type number, and treat it as the first fake parameter for compile-time checking.
Demonstrates a generic function that shallow clones an object with a fullName field using the spread operator, constrained to T having firstName and lastName, and shows valid and invalid usage.
Learn how temporal uncertainty causes TypeScript to reject values after asynchronous callbacks, and apply a simple pattern: store a checked value in a new variable to preserve a restricted type.
Learn how the typeof type operator derives types from variables, generating type aliases for two- and three-dimensional points and inferring types from JSON responses.
Learn how TypeScript lookup types reference fields from a submit request to keep types cohesive, avoid type noise, and derive payment and array item types without extra aliases.
Explore the keyof type operator to safely access and set any property of a type using generics, constraints, and lookup types, avoiding invalid keys in TypeScript.
Explore how conditional types in TypeScript use the conditional (ternary) operator to compute types at compile time, including the isnumber utility and runtime typeof mappings.
Understand how never interacts with unions and conditional types in TypeScript. See how no empty maps to never and how never can be part of a union for type inference.
Explore how TypeScript conditional types use the infer keyword to extract array members. See ReturnType<T> inference and never when handling function and non-function inputs.
Explore mapped types to create a read-only version of a point type, with immutable center, using keys, key of operator, and a generic utility type to derive read-only versions.
Explore mapped type modifiers in TypeScript, mapping properties to apply read only and optional modifiers, with plus and minus tokens and the built-in Partial utility for state updates.
Explore how TypeScript template literal types enforce strings by combining literals and values, such as ensuring strings start with the example prefix and a number and end with a unit.
Explore Partial<T>, the partial mapped type that makes all members optional, shown on a point with x and y, and used to update only changed fields.
Discover how the required map type converts optional members to required, enabling safe defaults and eliminating null checks. See it in a circle config with defaults.
Explains TypeScript's built-in readonly mapped type Readonly<T>, demonstrates with a point type, and shows a makeReadonly utility using Object.freeze to enforce immutability at compile time and runtime.
Understand TypeScript's record utility: map a set of literal keys to a uniform value type, enforce required keys, and use literal unions for precise key constraints.
Shows how to preserve autocomplete for design token literals while allowing arbitrary strings in a property, using a union with string and an intersection workaround via the get bidding function.
Configure TypeScript project references with composite and reference properties to enable a lib consumed by an app via relative paths, plus build and watch modes for automatic recompilation.
Explore the difference between optional members and a union with undefined, and learn when to use each, including refactoring benefits and practical examples like set config.
Learn how TypeScript's satisfies operator enforces that a color theme object conforms to a theme type, while preserving inference for keys like secondary and preventing invalid values.
Explain that JavaScript keys must be string, number, or symbol, and other values are coerced to strings, causing unpredictable results, while TypeScript's PropertyKey represents union of string, number, and symbol.
Explore the this type utility in TypeScript, used to define this within objects, enabling safe access to data and methods in state-like patterns common to React and Vue libraries.
Harness the awaited<T> utility to unwrap nested promises in TypeScript, revealing the final value and mirroring JavaScript's promise resolution.
Explore TypeScript’s built-in string utilities—uppercase, lowercase, and capitalize—and how template literal types let you create getter and setter utilities that produce get name and set name from a string literal.
Derive type-safe setters and getters from a state type using TypeScript mapped types, match types, and template literals with as clauses, and compose them into a generic store.
Explore how unions and intersections in TypeScript map to set theory using simple objects with name and age, revealing how structural typing affects safe property access and compile-time errors.
Explore why TypeScript enums are discouraged for professional use, focusing on runtime numeric behavior and type-safety issues; learn string-literal unions and const object patterns as safer alternatives.
I've been teaching TypeScript since 2012 (since launch). While teaching Juniors as well as Experts, I gathered a few tricks to make it an easy and smooth learning experience. I share those experiences with you. The objective is simple:
You can feel confident about what TypeScript is and offers
You become a competent TypeScript / JavaScript developer
A lot of effort has gone into this course to make sure you get all the knowledge you need, as quickly as possible.
Why TypeScript
I've been teaching and working with JavaScript for the past 10 years. TypeScript is hands down the best way to learn JavaScript. Give a beginner JavaScript developer a workflow with the TypeScript compiler and they can actually learn stuff themselves thanks to TypeScript's excellent 1000+ compiler errors that prevent common mistakes.
Why this course
I'm a Microsoft MVP (Most Valuable Professional) for TypeScript thanks to my teaching contributions in the form of books, various videos and answers on StackOverflow.
This provides the best guidance possible for all the ways you can use TypeScript for your JavaScript projects to give you the most chances of success in your professional career. This course is based on my experience in that area and curated based on key workshop insights.