typescript

    TypeScript Course

    Master TypeScript from first types to enterprise architecture, runtime trust boundaries, performance, security, and interviews.

    102
    Lessons
    18
    Modules
    0/102
    Completed

    Architecture

    TypeScript Compilation & Trust Boundaries

    Static analysis protects authored code at compile time; runtime schemas protect data entering from the network, browser, environment, and storage.

    .ts / .tsx
    source
    parse
    Program + AST
    symbols
    check
    Type Checker
    diagnostics
    emit
    JavaScript
    types erased
    run
    Browser / Node
    runtime
    Compile-time contracts
    Inference, narrowing, generics
    Declarations
    .d.ts public API surfaces
    Incremental builds
    Cache and project references
    Runtime validation
    Required at trust boundaries
    Curriculum

    Enterprise learning path

    18 modules · 102 lessons

    TypeScript Tutorial

    0/18 complete
    1. 1
      TypeScript Home
      Next up

      See the full TypeScript path from first types to enterprise architecture, interviews, and runtime trust boundaries.

    2. 2
      What is TypeScript?

      Define TypeScript as a compile-time contract language that emits JavaScript rather than a new runtime.

    3. 3
      Why TypeScript?

      Explain the production problems TypeScript solves and the problems it does not.

    4. 4
      TypeScript vs JavaScript

      Compare the two languages honestly: same runtime, different checking and tooling.

    5. 5
      TypeScript History

      Place TypeScript in the 2012–2026 ecosystem and use current stable language features.

    6. 6
      TypeScript Setup

      Install a modern TypeScript toolchain and create a checkable project.

    7. 7
      TypeScript Compiler

      Follow source through parse, check, and emit so you can debug diagnostics with confidence.

    8. 8
      Your First TypeScript Program

      Write, check, and run a small TypeScript program end to end before adding more types.

    9. 9
      TypeScript Project Structure

      Organize source, tests, and generated output so the compiler and humans agree.

    10. 10
      tsconfig.json

      Treat tsconfig as the project contract that defines which files are checked and how.

    11. 11
      Basic Types

      Use string, number, boolean, bigint, symbol, and object types with intent.

    12. 12
      Type Inference and Annotations

      Let the checker infer local details and annotate the boundaries that other people call.

    13. 13
      Variables

      Choose let, const, and readonly so mutation is visible and intended.

    14. 14
      Arrays and Tuples

      Distinguish homogeneous lists from fixed-position tuples so index meaning stays explicit.

    15. 15
      Enums

      Prefer union literals for most catalogs and use enums only when a runtime object is required.

    16. 16
      Any, Unknown, Never, and Void

      Use the four special types for escape hatches, boundaries, impossibility, and no useful value.

    17. 17
      Null and Undefined

      Make absence explicit with strictNullChecks instead of hoping values exist.

    18. 18
      Union, Intersection, and Literal Types

      Compose values that can be one of several shapes, all of several shapes, or exact literals.

    TypeScript Functions

    0/4 complete
    1. 19
      Function Types

      Write callable contracts with parameter and return types that callers can trust.

    2. 20
      Optional, Default, and Rest Parameters

      Make call sites honest about missing, defaulted, and variadic arguments.

    3. 21
      Function Overloads

      Use overloads for a few distinct call shapes and avoid them when a union return is clearer.

    4. 22
      Callbacks and Higher-Order Functions

      Type functions that receive or return other functions without losing parameter information.

    TypeScript Objects

    0/7 complete
    1. 23
      Object Types

      Describe object shapes as sets of properties rather than classes by default.

    2. 24
      Type Aliases and Interfaces

      Name object contracts with type or interface according to composition needs.

    3. 25
      Optional and Readonly Properties

      Mark fields that may be missing and fields that must not be reassigned.

    4. 26
      Index Signatures

      Type dictionaries carefully so known keys and open keys do not fight.

    5. 27
      Extending and Composing Types

      Build larger contracts from smaller ones without creating impossible intersections.

    6. 28
      Interface vs Type

      Choose the declaration form that matches merging, unions, and public API needs.

    7. 29
      Structural Typing

      Predict assignability from shape, not from class or interface names.

    Advanced TypeScript

    0/12 complete
    1. 30
      Generics

      Preserve relationships between reusable inputs and outputs with type parameters.

    2. 31
      Generic Functions and Interfaces

      Design reusable operations and contracts whose type relationships remain visible.

    3. 32
      Generic Classes and Constraints

      Build stateful reusable abstractions while constraining required capabilities.

    4. 33
      keyof, typeof, and Indexed Access

      Derive keys and property types from existing contracts without duplication.

    5. 34
      Conditional Types

      Select types from assignability relationships and model dependent contracts.

    6. 35
      Mapped Types

      Transform object contracts systematically across their key sets.

    7. 36
      Template Literal Types

      Construct and parse constrained string contracts from known vocabularies.

    8. 37
      Recursive Types

      Model nested structures whose children repeat the same shape.

    9. 38
      Discriminated Unions

      Represent state machines with explicit variants and exhaustive handling.

    10. 39
      Narrowing and Type Guards

      Use runtime evidence to refine broad static types along control-flow paths.

    11. 40
      User-Defined Type Guards

      Package trustworthy runtime checks into reusable narrowing functions.

    12. 41
      Assertions and satisfies

      Distinguish unchecked overrides from contract checking that preserves inference.

    Classes & OOP

    0/6 complete
    1. 42
      Classes and Constructors

      Create runtime objects with typed construction invariants and behavior.

    2. 43
      Access Modifiers and readonly

      Control class APIs and mutation while understanding compile-time and runtime privacy.

    3. 44
      Static and Abstract Classes

      Separate class-wide behavior from incomplete base contracts that subclasses must finish.

    4. 45
      Inheritance and Polymorphism

      Substitute specialized objects safely through stable behavioral contracts.

    5. 46
      Encapsulation

      Protect invariants behind small behavioral APIs instead of exposing representation.

    6. 47
      Composition over Inheritance

      Assemble behavior from explicit collaborators instead of deep class hierarchies.

    Modules

    0/6 complete
    1. 48
      ES Modules

      Organize code with standard static module boundaries and explicit dependencies.

    2. 49
      Imports and Exports

      Design stable module APIs with named, default, and re-export forms.

    3. 50
      Dynamic Imports

      Load module namespaces asynchronously when execution reaches a feature boundary.

    4. 51
      Module Resolution

      Understand how TypeScript maps import specifiers to source files and declarations.

    5. 52
      Declaration Files and Ambient Types

      Describe JavaScript and host-provided APIs without emitting implementation code.

    6. 53
      Type-Only Imports

      Mark dependencies used only by the checker and clarify emitted module behavior.

    TypeScript with JavaScript

    0/3 complete
    1. 54
      Migrating JavaScript to TypeScript

      Move a JavaScript codebase in slices without rewriting product behavior first.

    2. 55
      JSDoc, allowJs, and checkJs

      Type-check JavaScript in place with JSDoc before a full rename to TypeScript.

    3. 56
      Gradual Migration and Interoperability

      Keep TypeScript and JavaScript modules working together during the transition.

    TypeScript with APIs

    0/5 complete
    1. 57
      API Request and Response Types

      Model HTTP contracts as compile-time types and validate payloads at the boundary.

    2. 58
      DTOs and Generic Responses

      Separate wire DTOs from domain models and reuse generic envelopes.

    3. 59
      Error and Pagination Types

      Make failure and paging states explicit so UI and clients cannot ignore them.

    4. 60
      Type-Safe API Clients

      Build clients whose methods expose typed inputs after runtime validation of outputs.

    5. 61
      Runtime Validation and Zod Concepts

      Use schema libraries to prove unknown data before it enters typed code.

    TypeScript with React

    0/3 complete
    1. 62
      React Props, State, and Events

      Type component inputs, state, and DOM events without fighting React's own types.

    2. 63
      Generic Components and Hooks

      Preserve item types through reusable lists and custom hooks without collapsing to any.

    3. 64
      React Forms and API Types

      Keep form state, validation, and API DTOs aligned without trusting the browser.

    TypeScript with Angular

    0/2 complete
    1. 65
      TypeScript in Angular

      Use TypeScript as Angular's native language for components, services, and injection tokens.

    2. 66
      Angular HTTP Generics and Strict Templates

      Use HttpClient generics carefully and enable strict template checking.

    TypeScript with Node.js

    0/4 complete
    1. 67
      Node.js and TypeScript Setup

      Configure TypeScript for modern Node modules and a repeatable server typecheck.

    2. 68
      Node Modules and Environment Variables

      Type ESM/CJS boundaries and treat process.env as unknown configuration.

    3. 69
      Express and Fastify Typing

      Type handlers, params, and bodies without treating req.body as a trusted domain object.

    4. 70
      Node Backend Architecture

      Place TypeScript contracts in domain, application, and adapter layers.

    Async TypeScript

    0/2 complete
    1. 71
      Promises and async/await

      Type asynchronous success and failure without losing the resolved value type.

    2. 72
      Typed Concurrency and Errors

      Model parallel work, timeouts, and typed failure without any.

    TypeScript Configuration & Build

    0/5 complete
    1. 73
      compilerOptions and Strictness

      Turn on the options that make TypeScript a contract checker instead of a linter you can ignore.

    2. 74
      strictNullChecks and noUncheckedIndexedAccess

      Make absence and missing index results visible in the type system.

    3. 75
      Modules, Paths, and Interop

      Explain target, module, moduleResolution, esModuleInterop, baseUrl, and paths.

    4. 76
      Source Maps, Declarations, and Incremental

      Generate debug maps, public .d.ts files, and incremental caches with intent.

    5. 77
      Project References and Build Systems

      Split a large repo into referenced projects so checking stays incremental.

    TypeScript Testing

    0/3 complete
    1. 78
      Type-Safe Tests with Vitest or Jest

      Write tests that fail compilation when public APIs drift and unsafe calls become legal.

    2. 79
      Mocks and Test Helpers

      Type mocks so they stay assignable to the ports they replace.

    3. 80
      API Mocking and Test Architecture

      Mock HTTP at the boundary and keep domain tests free of fetch details.

    Enterprise TypeScript

    0/6 complete
    1. 81
      Domain Models and DTOs

      Keep business types independent from transport types so JSON changes do not rewrite domain rules.

    2. 82
      API Contracts and Shared Types

      Share versioned contracts without creating a dump of every type.

    3. 83
      Clean Architecture and DDD

      Align TypeScript modules with domain language and inward dependencies.

    4. 84
      Repositories and Dependency Inversion

      Depend on typed ports so infrastructure can change without rewriting use cases.

    5. 85
      Monorepos, Nx, and Shared Libraries

      Scale TypeScript across many packages with ownership and affected builds.

    6. 86
      Large-Scale TypeScript Architecture

      Govern types, builds, and boundaries for a multi-team TypeScript platform.

    Performance & Security

    0/7 complete
    1. 87
      Compiler and Build Performance

      Speed up checking with incremental programs, not by turning off safety.

    2. 88
      Bundling, Tree Shaking, and Runtime Performance

      Separate erased types from JavaScript that actually ships and runs.

    3. 89
      Large Repository Optimization

      Keep a large TypeScript repo navigable for humans and the compiler.

    4. 90
      TypeScript Security Misconceptions

      Separate reviewability benefits from security controls so types are not treated as a firewall.

    5. 91
      Trust Boundaries and Validation

      Draw the lines where data becomes trusted and validate there once.

    6. 92
      Assertions, any, and Dependency Security

      Treat any, assertions, and untyped dependencies as risk, not convenience.

    7. 93
      Authentication and Authorization Types

      Model identity and permissions as data, then enforce them in executable code.

    Advanced Projects

    0/5 complete
    1. 94
      Type-Safe E-Commerce Application

      Apply the course to a catalog, cart, and checkout with validated payments.

    2. 95
      Type-Safe Learning Platform

      Type learners, lessons, progress, and entitlements for TechLearningPro itself.

    3. 96
      API Client Library

      Ship a typed client with generated or handwritten contracts and runtime parsers.

    4. 97
      React, Angular, and Node Projects

      Reuse one command type across a React UI, an Angular UI, and a Node API.

    5. 98
      Enterprise Architecture Capstone

      Integrate configuration, testing, boundaries, performance, and security into one design.

    Practice & Evaluation

    0/4 complete
    1. 99
      TypeScript Exercises and Coding Challenges

      A sequenced practice set that compounds types, narrowing, APIs, and configuration.

    2. 100
      TypeScript Interview Questions and Answers

      Rehearse beginner through architect answers that explain reasoning and trade-offs.

    3. 101
      Architecture Challenges and Mini Projects

      Defend a TypeScript platform design with boundaries, packages, and fitness functions.

    4. 102
      TypeScript Quiz

      Check compile-time versus runtime thinking, unknown boundaries, configuration, and architecture judgments with instant feedback.