Skip to main content

Type Signature · #48 · 2026-05-22

What happens when you compile this?

TypeScript ·Difficulty 3/3

How to play

Read the TypeScript snippet and pick the correct type from four choices. Think about inference, narrowing, and utility types. Press 1–4 or click to answer.

function choose<T>(options: T[], defaultOpt: NoInfer<T>): T {
  return defaultOpt;
}
const r = choose(['a', 'b', 'c'], 'd');

Loading your progress...

Press 1 through 4, or tap a numbered choice, to answer. Back to hub