TypeScript — Senior Interview Prep
On this page4
- Files
- How an interviewer probes TypeScript depth
- Related
- External resources
TypeScript — Senior Interview Prep
Type-level depth for a senior React/Vue + TypeScript interview. Not “what is string” — the parts that come up under “you wrote this — explain it” or “narrow this type without an as.”
Files
How an interviewer probes TypeScript depth
- “Type this without
any” — exercises generics, conditional types, narrowing.
- “Why is your value typed
never?” — exercises distributive conditionals or empty-union narrowing.
- “Reimplement
Pick<T, K> from scratch” — exercises mapped types + keyof.
- “What does
satisfies give you that as doesn’t?” — exercises preservation of literal types and ergonomics vs assertion.
- “Your
forwardRef’d generic component lost its generic parameter — why?” — exercises React typing nuances.
Hit those, you’re senior. Stumble on them, you’re mid.
External resources
Contents
10
- TypeScript Generics 5 Generics are type-level parameters. They let a function, class, or type be reused across many concrete types without losing type information (the…
- Conditional and Mapped Types (and infer) Conditional types, mapped types, and infer together form TypeScript's expression layer — the part of the type system that computes new types from existing ones.
- Template Literal Types 5 Template literal types are template strings, but at the type level — ` prefix_${T} builds new string-literal types from existing ones.
- Built-in Utility Types — Reimplemented from Scratch Every "magic" utility type in TypeScript (Partial, Pick, Record, ReturnType, Awaited, ...) is a thin wrapper around the primitives in 01_generics.md,…
- Type Narrowing and Type Guards Narrowing is how TypeScript tracks a value's type through a function — typeof x === 'string' inside an if actually changes x's type inside the block.
- The satisfies Operator 5 satisfies T (TS 4.9+) checks that a value conforms to type T without widening the value's inferred type.
- Declaration Merging and Module Augmentation TypeScript can merge multiple declarations with the same name in the same scope — interfaces, namespaces, sometimes function + namespace pairs.
- Typing React Components 5 The day-job TypeScript: typing props, children, refs, events, hooks, and generic components — including the awkward intersections (forwardRef of a generic…
- tsconfig Strictness Flags — What Each One Prevents 4 "strict": true is a meta-flag enabling a family of stricter checks; each sub-flag prevents a specific class of bug.
- TypeScript Pitfalls — any/unknown/never, type vs interface, and Other Senior Traps 6 A grab bag of the questions interviewers use to separate "I write TS" from "I understand TS." any is a hole in the type system; unknown is the safe…