Block 03 ยท TYPED JAVASCRIPT PATH
TypeScript
Seventeen imported modules from first type annotations through advanced conditional and mapped types.
Progress one module at a time
Course map
- Module 014 activities
What is TypeScript?
TypeScript is a language developed by Microsoft in 2012 โ it adds a `type system` on top of JavaScript. It exists to catch mistakes while you type instead of after your code ships: you specify what types your variables, functions, and objects should hold, and the `TypeScript compiler` checks every use of that value against its declared type before compiling ("transpiling") the code down to plain JavaScript that runs anywhere JS already runs.
LessonQuizExerciseProject - Module 024 activities
Primitive Types
TypeScript's core primitives are `string` (text), `number` (any numeric value โ int, float, hex), and `boolean` (true/false).
LessonQuizExerciseProject - Module 034 activities
Arrays & Tuples
Arrays hold multiple values of the same `type` โ TypeScript enforces this at compile time.
LessonQuizExerciseProject - Module 044 activities
Objects & Interfaces
An interface defines the shape of an object โ which properties it has, their `types`, and whether they are `optional` or `readonly`. Interfaces are reusable and can be `extended`.
LessonQuizExerciseProject - Module 054 activities
Functions
Functions are reusable blocks of code. In TypeScript you can explicitly type `parameters` and `return types`, preventing errors like passing the wrong argument type or misusing a return value.
LessonQuizExerciseProject - Module 064 activities
Union Types
Union types let a variable hold values of more than one type using the `|` (pipe) operator.
LessonQuizExerciseProject - Module 074 activities
Classes
Classes are blueprints for creating objects. TypeScript adds access modifiers and strict typing on top of JavaScript classes.
LessonQuizExerciseProject - Module 084 activities
Generics
Generics let you write reusable code that works with different types while staying type-safe. They use the `<T>` syntax.
LessonQuizExerciseProject - Module 094 activities
Enums
Enums let you define a set of named constants, making code more readable and self-documenting.
LessonQuizExerciseProject - Module 104 activities
Type Narrowing
Type narrowing is how TypeScript figures out a more specific type from a broad one using guards or assertions.
LessonQuizExerciseProject - Module 114 activities
Modules
Modules split code into separate files using `export` and `import`.
LessonQuizExerciseProject - Module 124 activities
Utility Types
TypeScript ships with built-in generic helper types: `Partial`, `Required`, `Pick`, `Omit`, `Record`, `ReturnType`, `NonNullable`.
LessonQuizExerciseProject - Module 134 activities
Decorators
Decorators are functions that wrap other code. They start with `@` and sit above a class, method, property, or parameter.
LessonQuizExerciseProject - Module 144 activities
tsconfig.json
TypeScript uses `tsconfig.json` to understand how to compile your project. Generate it with `tsc --init`.
LessonQuizExerciseProject - Module 154 activities
TypeScript + React
TypeScript enhances React with typed `props`, typed `state`, typed `refs`, and typed `events`.
LessonQuizExerciseProject - Module 164 activities
TypeScript + Node.js
TypeScript works seamlessly with Node.js and Express for type-safe server code.
LessonQuizExerciseProject - Module 174 activities
Advanced Types
The deep end of TypeScript: conditional types, mapped types, template literal types, and `infer`.
LessonQuizExerciseProject - Module 185 activities
Strict Type Safety & Error Modeling
Use strict mode, unknown, never, discriminated results, exhaustive checks, and safe error boundaries.
LessonQuizExerciseReviewProject - Module 195 activities
Typed APIs & Runtime Validation
Separate compile-time types from untrusted runtime data and validate API boundaries before values enter the application.
LessonQuizExerciseReviewProject - Module 205 activities
TypeScript Testing & Architecture
Test typed functions, design dependency boundaries, use fakes, and keep domain logic independent from frameworks.
LessonQuizExerciseReviewProject - Module 215 activities
TypeScript Mastery Capstone
Combine strict types, generics, validation, modules, tests, and framework integration in one production-style application.
LessonQuizExerciseReviewProject