Courses / Web apps & analytics / TypeScript Programming

Free courseSelf-paced

TypeScript Programming

Build a typed TypeScript domain library with validated JSON input, file persistence, and both compile-time and runtime tests.

  • Who it's for. JavaScript developers who want the compiler to catch mistakes before their code runs.
  • Before you start. JavaScript Programming or equivalent: functions, arrays, objects, loops, ES modules and async code in Node.js, npm scripts and stack traces. No static-typing experience assumed.
  • 30 to 51 hours of study with practice
  • 8 modules, 53 lessons
  • 3 guided projects and a final project

What you'll learn

  • Install and pin the TypeScript compiler, configure a strict tsconfig and read diagnostics by code and location.
  • Model data with literal, union, interface and discriminated-union types.
  • Narrow unions safely with control flow, type guards and exhaustiveness checks.
  • Validate untrusted JSON and configuration at runtime before trusting a static type.
  • Deliver a typed library backed by compile-time type tests and runtime tests.

Skills you'll gain

  • TypeScript toolchain
  • Primitive
  • union types
  • Objects
  • interfaces
  • Functions
  • narrowing
  • Generics
  • Modules
  • configuration
  • Typed application project

Tools you'll use

  • TypeScript compiler (tsc)
  • tsconfig (strict)
  • Node.js
  • ES modules (NodeNext)
  • npm

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 8 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 4 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 3

    Types for data

    Set up the compiler, describe values with primitive and union types, and model objects with interfaces.

    You build: Typed library-loan records with a strict tsconfig and passing check script.

  2. 02

    Modules 4 to 5

    Functions and generics

    Type functions, narrow unions and write generic helpers.

    You build: Typed pipeline helpers with exhaustive narrowing, a generic groupBy and a Result type.

  3. 03

    Modules 6 to 7

    Projects and runtime boundaries

    Split code into modules, configure builds, and validate untrusted input.

    You build: Validated configuration and JSON loader in a multi-file NodeNext project.

  4. 04

    Module 8

    Typed application project

    Assemble the typed domain library with tests and setup instructions.

    You build: Final typed library.

Full curriculum

8 modules and 53 lessons, 30 to 51 hours of study

01TypeScript toolchain6 lessons, 3 to 4 hours

Lessons

  • What tsc does to a JavaScript file
  • Pinning TypeScript in a project
  • Reading a compiler diagnostic
  • Strict mode and its two key switches
  • Inference versus annotation
  • Emit, outDir and running the compiled program

After this module you can

  • Run tsc on a one-file program and state, from the output, which parts of the source disappear and which remain.
  • Create an npm project with TypeScript as a pinned dev dependency and run it through an npm script instead of a global install.
  • Configure outDir and noEmitOnError, build a multi-line program and run the emitted JavaScript with node, then show that a type error does not stop a default emit.
02Primitive and union types7 lessons, 3 to 5 hours

Lessons

  • Primitive types and their annotations
  • Literal types and widening
  • Union types and the shared-members rule
  • null, undefined and optional values under strictNullChecks
  • Arrays, tuples and readonly sequences
  • as const, literal unions and enums
  • any, unknown and never

After this module you can

  • Annotate variables with string, number, boolean, bigint and symbol and predict which literal initialisers are accepted.
  • Explain why `const` keeps a literal type while `let` widens, and use literal types to restrict values.
  • Choose among any, unknown and never in the right situations and explain what the compiler allows for each.
03Objects and interfaces7 lessons, 3 to 5 hours

Lessons

  • Structural typing and excess property checks
  • Optional and readonly properties
  • Interfaces and type aliases
  • Index signatures and Record
  • Extending interfaces and intersection types
  • Discriminated unions
  • Classes, access modifiers and implements

After this module you can

  • Predict when an object is assignable to a shape, distinguishing structural compatibility from the fresh-literal excess property check.
  • Mark properties optional or readonly, and predict which reads, writes and omissions compile.
  • Write a class with typed fields, parameter properties and access modifiers that implements an interface, and state which protections vanish at runtime.
04Functions and narrowing7 lessons, 3 to 5 hours

Lessons

  • Parameter and return types, void and implicit returns
  • Optional, default and rest parameters
  • Function types, callbacks and contextual typing
  • Function overloads
  • Narrowing with typeof, truthiness, equality, in and instanceof
  • User-defined type guards and assertion functions
  • Exhaustiveness checking with never

After this module you can

  • Type a function's parameters and return value, and distinguish void from undefined and from a missing return on some path.
  • Use `?`, default values and rest parameters, and predict the parameter types seen inside the body and by callers.
  • Use a never-typed default branch so adding a union member makes the compiler flag every unhandled switch.
05Generics7 lessons, 3 to 5 hours

Lessons

  • Generic functions and type inference
  • Constraints with extends
  • Generic interfaces, aliases and classes
  • keyof, typeof and indexed access types
  • Mapped types and built-in utility types
  • Conditional types and infer
  • The satisfies operator and const type parameters

After this module you can

  • Write a function with a type parameter and explain how the compiler infers it from arguments.
  • Restrict a type parameter with `extends` and use the constraint's members inside the body.
  • Use `satisfies` to validate an object against a type while keeping its narrow inferred type, and compare with annotation.
06Modules and configuration6 lessons, 3 to 4 hours

Lessons

  • Exporting and importing ES module members
  • import type, export type and verbatimModuleSyntax
  • NodeNext resolution and file extensions
  • tsconfig structure: include, exclude, rootDir and outDir
  • Declaration files, @types and ambient declarations
  • Build scripts, tsc -b and project references

After this module you can

  • Split a program into modules with named and default exports and explain what makes a file a module to the compiler.
  • Mark type-only imports and exports explicitly and explain what verbatimModuleSyntax enforces about emitted imports.
  • Build a two-package workspace with project references and explain composite, incremental builds and the build order.
07Runtime validation boundaries7 lessons, 3 to 5 hours

Lessons

  • Why types disappear at runtime
  • Parsing unknown JSON into typed values
  • Writing reusable validators with type predicates
  • Collecting validation errors with field paths
  • Deriving static types from a schema library
  • Branded types and parse-don't-validate
  • Validating environment variables and configuration at startup

After this module you can

  • Demonstrate with a short program that a wrong-shaped JSON value passes the compiler through a cast yet breaks at runtime, and name the trust boundary.
  • Read JSON as unknown and narrow it step by step to an object type with typeof, in and Array.isArray.
  • Parse process.env into a typed config object once at startup and fail fast with clear errors.
08Typed application project6 lessons, 3 to 4 hours

Lessons

  • Modelling the domain so invalid states are unrepresentable
  • A repository interface with in-memory and file implementations
  • Service functions returning Results
  • Compile-time type tests
  • Runtime tests with the Node test runner
  • Packaging, documenting and demonstrating the library

After this module you can

  • Write a domain-model design note and the corresponding types for a chosen capstone option, justifying each union, brand and readonly decision.
  • Define a generic async repository interface and implement it twice, with the file version reading and writing JSON through the validators.
  • Prepare a clean-clone setup, a README and a live demonstration of build, tests and a scripted scenario.

What you'll build

3 guided projects along the way, then a final project.

  • Typed library-loan records

    after module 3
  • Typed pipeline helpers with narrowing and generics

    after module 5
  • Validated configuration and JSON loader

    after module 7

Final project

Choose one typed library: booking rules, a personal-finance ledger or a course-progress tracker, each with a Result-based API, validated JSON import and file persistence.

What you submit

Project folder with pinned TypeScript, strict tsconfig and README; at least three ES modules with declaration output; at least 6 compile-time type tests and 10 runtime tests; restart evidence.

How it's reviewed

Rubric on type modelling, boundary validation and test quality, with zero any or ts-ignore, plus a live demonstration of build, tests and one design decision.

Where you'll use it

  • Add types to an existing JavaScript module so invalid calls fail at compile time.
  • Write a parser that turns unknown JSON into typed records with field-path errors.

Roles that use these skills

  • TypeScript developer
  • Frontend developer
  • Node.js developer

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

Do I need TypeScript experience?

No static-typing experience is assumed, but you need working JavaScript from the earlier course.

Are types checked when the program runs?

No. Types are erased, so the course teaches runtime validation of untrusted JSON and input.

Can I use any to get past errors?

Not in the final project: it requires zero any, ts-ignore and unjustified assertions.

Be first in when TypeScript Programming opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
FreeOpens soon
Notify me