TypeScript Core (Interview Prep)
A structured roadmap of the TypeScript fundamentals that matter most in frontend interviews. Start top-to-bottom.
Series: TypeScript Core
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.
Roadmap (30)
Practice TypeScript Core articles →- 1
TypeScript: types vs interfaces (When to Use Which)
~22 minA deep, interview-ready guide to TypeScript types vs interfaces: extension, unions, intersections, declaration merging, and practical patterns for real codebases.
- 2
TypeScript Generics: Basics, Constraints, and Real Patterns
~20 minA 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
TypeScript Narrowing & Discriminated Unions (Interview-Ready)
~24 minA deep, interview-ready guide to narrowing in TypeScript: typeof, in, instanceof, user-defined type guards, and discriminated unions for safe, expressive code.
- 4
TypeScript Utility Types: Pick, Omit, Partial, Record (Practical Guide)
~22 minA deep, interview-ready guide to TypeScript utility types: Pick/Omit/Partial/Required/Readonly/Record, common patterns, and how to avoid over-complicating types.
- 5
any vs unknown vs never (Interview-Ready)
2 min readHow to choose any/unknown/never, why unknown is safer, and how never appears in narrowing and exhaustive checks.
- 6
Type Guards & Narrowing Patterns
1 min readHow narrowing works in TypeScript: typeof/in, custom type guards, assertion functions, and practical patterns for safer code.
- 7
The `satisfies` Operator (Why It’s a Big Deal)
1 min readHow `satisfies` helps validate shapes without losing literal types, and why it often beats `as const` and type annotations.
- 8
Conditional Types + infer (Interview Essentials)
1 min readUnderstand conditional types, infer, and how TypeScript extracts types from functions/promises/arrays.
- 9
TypeScript Declaration Merging: Examples & Common Errors
4 min readLearn TypeScript declaration merging with working interface and module augmentation examples, common compiler errors, and an interview exercise.
- 10
tsconfig.json: The Settings That Matter
1 min readA practical guide to TS compiler options interviewers ask about: strict, noImplicitAny, lib, moduleResolution, jsx, and incremental builds.
- 11
Enums vs Union Types (and const enums)
1 min readWhen to use enums, when to prefer string unions, and what const enums change.
- 12
Typing React Components in TypeScript (Practical Patterns)
1 min readProps, children, event handlers, generics in components, and common TS + React pitfalls interviewers ask about.
- 13
Mapped Types, keyof, and Template Literal Types (Interview-Ready)
1 min readHow keyof + mapped types work, and how template literal types unlock powerful typed APIs.
- 14
Advanced Generics: Overloads, Inference Tricks, and Variance
2 min readInterview-focused advanced generics: overloads, inference patterns, variance basics, and designing ergonomic typed APIs.
- 15
Type-Level Testing & API Design Patterns
2 min readHow to validate TypeScript types, design safer APIs, and avoid unsafe assertions—interview-ready patterns.
- 16
ESM vs CJS in TypeScript (Interop Without Tears)
4 min readUnderstand what TypeScript emits vs what Node runs, and how to avoid the common import/export traps in real codebases.
- 17
package.json exports + Types: Designing a Clean Public API
2 min readHow to structure multi-entry TypeScript packages with package.json exports, prevent deep imports, and ship correct .d.ts for consumers.
- 18
moduleResolution: NodeNext vs Bundler (and Why It Breaks Builds)
3 min readHow TypeScript resolves imports in modern toolchains, when to use NodeNext vs bundler, and how flags like verbatimModuleSyntax affect real projects.
- 19
Path Aliases That Don’t Break Production (@/ Without Regret)
3 min readHow to use tsconfig paths safely across Next.js, bundlers, Node scripts, and tsc builds—without ‘works locally, fails in prod’.
- 20
Conditional Exports (node/browser) + Correct Types
3 min readHow to publish different entry points for Node vs browser (or edge) using package.json exports conditions, without breaking TypeScript consumers.
- 21
Strongly Typed pipe()/compose() (Variadic Tuples vs Overloads)
2 min readHow to type function pipelines like a library author: overloads, variadic tuples, inference boundaries, and what interviewers really want to see.
- 22
Template Literal Types for Safe Routes, Events, and Keys
2 min readUse template literal types to make strings type-safe: route patterns, event names, CSS variables, and i18n keys—with realistic examples.
- 23
Branded Types: Safer IDs, Money, and Domain Values
2 min readUse branded (nominal-ish) types to prevent mixing IDs and domain values, and learn safer alternatives to ‘just cast it’.
- 24
unknown → Safe Types: Runtime Validation Patterns
2 min readStop lying with `as`. Learn production patterns to convert unknown data (fetch, localStorage, env) into safe TypeScript types with guards and assertions.
- 25
satisfies: Enforce Shape Without Losing Literal Types
2 min readUse the satisfies operator to validate objects (routes, feature flags, configs) while preserving literals for great inference and fewer casts.
- 26
Bug-Catching TS Flags: noUncheckedIndexedAccess & exactOptionalPropertyTypes
2 min readTwo TypeScript options that catch real production bugs: safer indexing and optional properties that behave like you think.
- 27
Typed Forms Without Pain (Mapped Types + Generic Helpers)
2 min readA production-friendly pattern to type form values, errors, and validators using mapped types—no giant unions, no any.
- 28
Polymorphic React Components (the 'as' Prop) with Type Safety
2 min readHow to type a polymorphic component like a design-system author: correct props, correct refs, and zero unsafe casts.
- 29
Type-Level Testing + Public API Design (Library Author Mindset)
2 min readHow to keep TypeScript APIs stable: test your types, design exports intentionally, and avoid leaking internals that you can’t maintain.
- 30
Scaling TypeScript: Project References, Composite Builds, and Fast CI
2 min readHow large TypeScript codebases stay fast: project references, composite builds, incremental compilation, and clean boundaries.