Skip to content

TypeScript Core (Interview Prep)

A structured roadmap of the TypeScript fundamentals that matter most in frontend interviews. Start top-to-bottom.

Series: TypeScript Core

Progress: 0/30

Start here

TypeScript: types vs interfaces (When to Use Which)

A deep, interview-ready guide to TypeScript types vs interfaces: extension, unions, intersections, declaration merging, and practical patterns for real codebases.

  1. 1

    TypeScript: types vs interfaces (When to Use Which)

    ~22 min

    A deep, interview-ready guide to TypeScript types vs interfaces: extension, unions, intersections, declaration merging, and practical patterns for real codebases.

  2. 2

    TypeScript Generics: Basics, Constraints, and Real Patterns

    ~20 min

    A deep, interview-ready guide to TypeScript generics: why they exist, how inference works, constraints (extends), default generics, and practical examples used in real codebases.

  3. 3

    TypeScript Narrowing & Discriminated Unions (Interview-Ready)

    ~24 min

    A deep, interview-ready guide to narrowing in TypeScript: typeof, in, instanceof, user-defined type guards, and discriminated unions for safe, expressive code.

  4. 4

    TypeScript Utility Types: Pick, Omit, Partial, Record (Practical Guide)

    ~22 min

    A deep, interview-ready guide to TypeScript utility types: Pick/Omit/Partial/Required/Readonly/Record, common patterns, and how to avoid over-complicating types.

  5. 5

    any vs unknown vs never (Interview-Ready)

    2 min read

    How to choose any/unknown/never, why unknown is safer, and how never appears in narrowing and exhaustive checks.

  6. 6

    Type Guards & Narrowing Patterns

    1 min read

    How narrowing works in TypeScript: typeof/in, custom type guards, assertion functions, and practical patterns for safer code.

  7. 7

    The `satisfies` Operator (Why It’s a Big Deal)

    1 min read

    How `satisfies` helps validate shapes without losing literal types, and why it often beats `as const` and type annotations.

  8. 8

    Conditional Types + infer (Interview Essentials)

    1 min read

    Understand conditional types, infer, and how TypeScript extracts types from functions/promises/arrays.

  9. 9

    TypeScript Declaration Merging: Examples & Common Errors

    4 min read

    Learn TypeScript declaration merging with working interface and module augmentation examples, common compiler errors, and an interview exercise.

  10. 10

    tsconfig.json: The Settings That Matter

    1 min read

    A practical guide to TS compiler options interviewers ask about: strict, noImplicitAny, lib, moduleResolution, jsx, and incremental builds.

  11. 11

    Enums vs Union Types (and const enums)

    1 min read

    When to use enums, when to prefer string unions, and what const enums change.

  12. 12

    Typing React Components in TypeScript (Practical Patterns)

    1 min read

    Props, children, event handlers, generics in components, and common TS + React pitfalls interviewers ask about.

  13. 13

    Mapped Types, keyof, and Template Literal Types (Interview-Ready)

    1 min read

    How keyof + mapped types work, and how template literal types unlock powerful typed APIs.

  14. 14

    Advanced Generics: Overloads, Inference Tricks, and Variance

    2 min read

    Interview-focused advanced generics: overloads, inference patterns, variance basics, and designing ergonomic typed APIs.

  15. 15

    Type-Level Testing & API Design Patterns

    2 min read

    How to validate TypeScript types, design safer APIs, and avoid unsafe assertions—interview-ready patterns.

  16. 16

    ESM vs CJS in TypeScript (Interop Without Tears)

    4 min read

    Understand what TypeScript emits vs what Node runs, and how to avoid the common import/export traps in real codebases.

  17. 17

    package.json exports + Types: Designing a Clean Public API

    2 min read

    How to structure multi-entry TypeScript packages with package.json exports, prevent deep imports, and ship correct .d.ts for consumers.

  18. 18

    moduleResolution: NodeNext vs Bundler (and Why It Breaks Builds)

    3 min read

    How TypeScript resolves imports in modern toolchains, when to use NodeNext vs bundler, and how flags like verbatimModuleSyntax affect real projects.

  19. 19

    Path Aliases That Don’t Break Production (@/ Without Regret)

    3 min read

    How to use tsconfig paths safely across Next.js, bundlers, Node scripts, and tsc builds—without ‘works locally, fails in prod’.

  20. 20

    Conditional Exports (node/browser) + Correct Types

    3 min read

    How to publish different entry points for Node vs browser (or edge) using package.json exports conditions, without breaking TypeScript consumers.

  21. 21

    Strongly Typed pipe()/compose() (Variadic Tuples vs Overloads)

    2 min read

    How to type function pipelines like a library author: overloads, variadic tuples, inference boundaries, and what interviewers really want to see.

  22. 22

    Template Literal Types for Safe Routes, Events, and Keys

    2 min read

    Use template literal types to make strings type-safe: route patterns, event names, CSS variables, and i18n keys—with realistic examples.

  23. 23

    Branded Types: Safer IDs, Money, and Domain Values

    2 min read

    Use branded (nominal-ish) types to prevent mixing IDs and domain values, and learn safer alternatives to ‘just cast it’.

  24. 24

    unknown → Safe Types: Runtime Validation Patterns

    2 min read

    Stop lying with `as`. Learn production patterns to convert unknown data (fetch, localStorage, env) into safe TypeScript types with guards and assertions.

  25. 25

    satisfies: Enforce Shape Without Losing Literal Types

    2 min read

    Use the satisfies operator to validate objects (routes, feature flags, configs) while preserving literals for great inference and fewer casts.

  26. 26

    Bug-Catching TS Flags: noUncheckedIndexedAccess & exactOptionalPropertyTypes

    2 min read

    Two TypeScript options that catch real production bugs: safer indexing and optional properties that behave like you think.

  27. 27

    Typed Forms Without Pain (Mapped Types + Generic Helpers)

    2 min read

    A production-friendly pattern to type form values, errors, and validators using mapped types—no giant unions, no any.

  28. 28

    Polymorphic React Components (the 'as' Prop) with Type Safety

    2 min read

    How to type a polymorphic component like a design-system author: correct props, correct refs, and zero unsafe casts.

  29. 29

    Type-Level Testing + Public API Design (Library Author Mindset)

    2 min read

    How to keep TypeScript APIs stable: test your types, design exports intentionally, and avoid leaking internals that you can’t maintain.

  30. 30

    Scaling TypeScript: Project References, Composite Builds, and Fast CI

    2 min read

    How large TypeScript codebases stay fast: project references, composite builds, incremental compilation, and clean boundaries.