Skip to main content
JourneyUncommon

TypeScript Essentials

Types, generics, narrowing. Write TS with confidence.

Questions
10
Tier
Starter
Language
TypeScript
Time
~12 min

Difficulty mix: 5 easy, 4 medium and 1 hard. The questions are drawn from the TypeScript library at the moment you start, so sitting the test twice does not give you the same paper.

What this test can pull from

44 TypeScript topics are in scope. These are the real topic labels on the questions.

  • type annotations
  • hand-rolled utility types
  • primitive types
  • ESM CJS interop
  • conditional-type distribution
  • control-flow analysis pitfalls
  • generic constraints
  • declaration merging
  • excess property checks
  • mapped types
  • union and literal types
  • infer
  • inference internals
  • arrays and tuples
  • moduleResolution modes
  • keyof and indexed access
  • discriminated unions
  • structural typing unsoundness
  • user-defined type guards
  • NoInfer and const type params
  • variadic tuple types
  • index signatures
  • typeof type queries
  • polymorphic this
  • verbatimModuleSyntax isolatedModules
  • satisfies operator
  • interface vs type alias
  • template literal types
  • conditional types
  • assertion functions

Questions of the kind this test asks

Six real TypeScript questions from the same pool, snippet included. The answer options and explanations are not shown here. Those come after you attempt them.

Prefer to pick your own questions? Browse all TypeScript questions. See the other 10 tests.