TypeScript Interview Questions & Answers
Prepare for TypeScript technical interviews with 100 curated questions and answers — from fundamentals to Tech Lead. Types, generics, narrowing, and scalable type architecture. Each question includes a short interview answer, detailed explanation, examples, tips, and common mistakes.
TypeScript interview topics
Jump into a category — each bank is independent and interview-focused.
Types
8 TypeScript questions
Interfaces
7 TypeScript questions
Generics
8 TypeScript questions
Utility Types
7 TypeScript questions
Type Narrowing
7 TypeScript questions
Type Guards
7 TypeScript questions
Classes
7 TypeScript questions
Decorators
7 TypeScript questions
Advanced Types
7 TypeScript questions
Conditional Types
7 TypeScript questions
Mapped Types
7 TypeScript questions
Type Inference
7 TypeScript questions
Type Safety
7 TypeScript questions
Architecture
7 TypeScript questions
All TypeScript interview questions
Types interview questions
View categoryWhat are TypeScript's primitive types?
freshany vs unknown vs never?
freshWhat is a union type and when do you use it?
juniorIntersection types — what are they for?
midtype vs interface for object shapes?
midWhat are literal types?
seniorExplain void vs undefined as return types.
seniorHow do tuples differ from arrays in TS?
leadInterfaces interview questions
View categoryWhat is declaration merging for interfaces?
freshHow do you extend interfaces?
juniorOptional vs readonly properties?
juniorIndex signatures — uses and pitfalls?
midHow do function types appear in interfaces?
midInterface for API response modeling tips?
seniorWhen do interfaces become an anti-pattern?
seniorGenerics interview questions
View categoryWhat problem do generics solve?
freshExplain generic constraints (extends).
juniorDefault type parameters — when useful?
juniorkeyof and indexed access with generics?
midGeneric variance intuition (in/out)?
midWhy inference sometimes fails with generics?
seniorGenerics vs overloads — how to choose?
seniorDesign a type-safe event emitter with generics.
leadUtility Types interview questions
View categoryType Narrowing interview questions
View categoryType Guards interview questions
View categoryClasses interview questions
View categoryDecorators interview questions
View categoryAdvanced Types interview questions
View categoryConditional Types interview questions
View categoryWhat is a conditional type?
freshWhat is distributivity in conditional types?
juniorinfer keyword — what does it do?
juniorExtract and Exclude implemented how?
midHow do you flatten Promise types with conditionals?
seniorDebugging monstrous conditional types?
seniorLibrary design: expose conditionals or simpler overloads?
leadMapped Types interview questions
View categoryType Inference interview questions
View categoryType Safety interview questions
View categoryArchitecture interview questions
View categoryHow do you structure types in a large TS monorepo?
freshDTO vs domain model typing?
juniorDependency injection typing approaches?
midHow do path aliases affect architecture?
midPublic API surface for a TS library?
seniorError typing strategies?
seniorLead: set TypeScript engineering standards for a team.
lead