Phase 8 · Interview prep · Lesson 8.1
Interview60 rapid-fire interview questions
Sixty short TypeScript interview questions in six topic decks, with answers phrased the way you would say them out loud, plus spot-checks between decks.
35 min
Most TypeScript interviews open with a burst of short questions: what is unknown, type or interface, what does strict do. Nobody expects an essay. They want a precise one-to-three sentence answer, said with confidence, and ideally one concrete example.
This lesson is sixty of those questions, grouped into six decks of ten.
How to use this
- Read the question on each card and answer out loud before flipping it. Saying it is the practice; recognising the answer is not.
- Keep a tally of the cards you missed or fumbled. Those are your review list.
- Do the spot-check quizzes between decks without scrolling back.
- Come back in a day or two and run only the cards you missed.
Deck 1: Basics
The warm-up. These check that you know what TypeScript actually is, the special types (any, unknown, never, void), and the everyday syntax. Getting any of these wrong early sets a bad tone, so they should feel automatic.
Interview cards
1 / 10
Quick check
What is the return type of failArrow?
const failArrow = (message: string) => {
throw new Error(message);
};Deck 2: Type system and narrowing
This deck is the heart of most interviews: unions, narrowing, discriminated unions, structural typing and the escape hatches (as, satisfies, type predicates). Expect follow-up questions here, so know an example for each.
Interview cards
1 / 10
Quick check
Which of these assignments is rejected by the compiler?
type Point = { x: number; y: number };
const p3 = { x: 1, y: 2, z: 3 };Deck 3: Objects, classes and modules
Questions here check that you know how TypeScript describes objects, where its class features differ from JavaScript's, and what survives compilation. The recurring theme: what is erased and what emits real code.
Interview cards
1 / 10
Deck 4: Generics
Generics questions go from what is a type parameter to why does this inference fail. Interviewers like asking you to write a small generic function on the spot, so pair each answer with a signature you could type from memory.
Interview cards
1 / 10
Quick check
What is T inferred as in each call?
function plain<T>(values: T[]): T[] {
return values;
}
function precise<const T>(values: readonly T[]): T[] {
return [...values];
}
const a = plain(["red", "blue"]);
const b = precise(["red", "blue"]);Deck 5: Type-level programming
Senior interviews almost always include a type-level question: read a mapped or conditional type, or say what a utility type does. Know the vocabulary precisely; distributive, infer and key remapping are the words interviewers listen for.
Interview cards
1 / 10
Deck 6: Config, tooling and modern features
The last deck covers what separates people who have run TypeScript in production from people who have only read about it: compiler flags, variance, branding and the features added since 5.0.
Interview cards
1 / 10
Recap
- Answer in one to three sentences: definition, why it exists, one example or gotcha.
- The topics that come up most:
any/unknown/never,typevsinterface, narrowing and discriminated unions, structural typing, generics withkeyof, and whatstrictdoes. - Know what emits runtime code (enums, parameter properties,
#private, decorators) and what is erased (everything else). - For type-level questions, use the right words: distributive, infer, key remapping, indexed access.
- Re-run only the cards you missed, a day later. Then move on to the type challenges.