TypeScript Fundamentals
Add type safety to your JavaScript — annotations, interfaces, generics, utility types, and tsconfig configuration.
View badge details
About This Course
Course Curriculum
14 Lessons
Why TypeScript and Basic Types
What TypeScript is and why use it, installing and running (tsc, ts-node), type annotations for primitives (string/number/boolean), arrays and tuples, any/unknown/never/void, type inference
Why TypeScript and Basic Types - Lab Exercises
What TypeScript is and why use it, installing and running (tsc, ts-node), type annotations for primitives (string/number/boolean), arrays and tuples, any/unknown/never/void, type inference
Interfaces and Type Aliases
Interface declarations, optional and readonly properties, extending interfaces, type aliases, interface vs type alias (when to use each), index signatures, function type signatures
Interfaces and Type Aliases - Lab Exercises
Interface declarations, optional and readonly properties, extending interfaces, type aliases, interface vs type alias (when to use each), index signatures, function type signatures
Union Intersection and Literal Types
Union types (string | number), discriminated unions, intersection types, literal types (specific string/number values), type narrowing with typeof/instanceof/in, type guards and assertion functions
Union Intersection and Literal Types - Lab Exercises
Union types (string | number), discriminated unions, intersection types, literal types (specific string/number values), type narrowing with typeof/instanceof/in, type guards and assertion functions
Generics
Generic functions, generic interfaces and classes, generic constraints (extends), default type parameters, keyof operator, mapped types basics, common generic patterns (Promise T, Array T)
Generics - Lab Exercises
Generic functions, generic interfaces and classes, generic constraints (extends), default type parameters, keyof operator, mapped types basics, common generic patterns (Promise
Utility Types and Advanced Patterns
Built-in utility types (Partial/Required/Pick/Omit/Record/Readonly/ReturnType), conditional types basics, template literal types, enums (string and numeric), declaration files (.d.ts), strict mode configuration
Utility Types and Advanced Patterns - Lab Exercises
Built-in utility types (Partial/Required/Pick/Omit/Record/Readonly/ReturnType), conditional types basics, template literal types, enums (string and numeric), declaration files (.d.ts), strict mode configuration
tsconfig and Project Setup
tsconfig.json options (target/module/strict/outDir/rootDir/paths), source maps, declaration files, ESM vs CJS output, integrating with existing JS projects, migrating JS to TS incrementally
tsconfig and Project Setup - Lab Exercises
tsconfig.json options (target/module/strict/outDir/rootDir/paths), source maps, declaration files, ESM vs CJS output, integrating with existing JS projects, migrating JS to TS incrementally
Capstone Briefing Type-Safe API Client
Capstone briefing: build a fully typed API client library with generics, interfaces for request/response types, error handling with discriminated unions, and strict tsconfig
Capstone Type-Safe API Client
Capstone: build a fully typed API client library with generics, interfaces for request/response types, error handling with discriminated unions, and strict tsconfig