Skip to main content
Journey Uncommon Logo
JourneyUncommon

TypeScript Interview Questions (606 to practise)

TypeScript adds a structural type system on top of JavaScript. Most of the difficulty sits in what the compiler infers, not in what you wrote.

Expect inference puzzles: conditional types, mapped types, variance on function parameters, and when a union distributes. A large share of questions are literally 'what is the inferred type here'.

Total questions
606
Easy
125
Medium
219
Hard
262

Where it shows up: Product engineering teams that outgrew plain JavaScript, design-system work, and any codebase large enough to need refactor safety.

Sample TypeScript questions

Twenty real TypeScript questions from the library, code snippet included. Nothing here is paraphrased for search engines. It is the same text a signed-in user sees.

Sign in to answer

Everything above is free to read. Answering needs a free account.

We keep the correct answer, the explanation and the scoring behind sign-in so the platform stays honest, which is why the answer options and the worked explanation for every TypeScript question stay behind a free account. Signing in is free and takes a few seconds.

TypeScript topics covered

44 distinct TypeScript topics are tagged across the library. These are the real topic labels stored on the questions, not a hand-written list.

  • type annotations (32)
  • hand-rolled utility types (27)
  • primitive types (25)
  • ESM CJS interop (23)
  • conditional-type distribution (19)
  • control-flow analysis pitfalls (19)
  • generic constraints (18)
  • declaration merging (18)
  • excess property checks (17)
  • mapped types (17)
  • union and literal types (16)
  • infer (16)
  • inference internals (16)
  • arrays and tuples (15)
  • moduleResolution modes (15)
  • keyof and indexed access (15)
  • discriminated unions (14)
  • structural typing unsoundness (14)
  • user-defined type guards (14)
  • NoInfer and const type params (14)
  • variadic tuple types (13)
  • index signatures (13)
  • typeof type queries (13)
  • polymorphic this (13)
  • verbatimModuleSyntax isolatedModules (13)
  • satisfies operator (12)
  • interface vs type alias (12)
  • template literal types (12)
  • conditional types (12)
  • assertion functions (12)
  • function overloads (11)
  • recursive types (10)
  • variance co contra (10)
  • recursive depth limits (9)
  • type-level string parsing (9)
  • branded nominal typing (9)
  • module augmentation (9)
  • generic defaults (8)
  • verbatimModuleSyntax / isolatedModules (8)
  • method bivariance / strictFunctionTypes (8)
  • preventing distribution (7)
  • compiler-performance blowups (7)
  • method bivariance strictFunctionTypes (6)
  • variance (co/contra) (5)

Search and filter every TypeScript question

Difficulty