TypeScript Interview Questions
Types vs interfaces, generics, utility & mapped types, type guards, and advanced type inference.
61 questions
Popular Searches
1. What is TypeScript and Why Use It?
easyFundamentals 6 mins2. TypeScript vs JavaScript
easyFundamentals 6 mins3. Types vs Interfaces in TypeScript
mediumTypes 7 mins4. What is Type Inference in TypeScript?
easyTypes 6 mins5. Union and Intersection Types in TypeScript
mediumTypes 7 mins6. What are Generics in TypeScript?
mediumGenerics 7 mins7. What are Enums in TypeScript?
easyTypes 5 mins8. any vs unknown vs never in TypeScript
hardTypes 7 mins9. What are Type Assertions in TypeScript?
mediumTypes 6 mins10. Optional and readonly Properties in TypeScript
easyTypes 5 mins11. What are Tuples in TypeScript?
mediumTypes 6 mins12. What are Type Guards in TypeScript?
mediumTypes 7 mins13. What are Utility Types in TypeScript?
mediumAdvanced 6 mins14. What are Mapped Types in TypeScript?
hardAdvanced 7 mins15. What are Conditional Types in TypeScript?
hardAdvanced 7 mins16. What are Decorators in TypeScript?
hardAdvanced 7 mins17. What are Declaration Files (.d.ts) in TypeScript?
mediumTooling 6 mins18. What are Literal Types in TypeScript?
mediumTypes 6 mins19. What are Discriminated Unions in TypeScript?
hardAdvanced 7 mins20. What are Function Overloads in TypeScript?
mediumFunctions 6 mins21. What is the keyof Operator in TypeScript?
mediumAdvanced 6 mins22. What is the typeof Operator in TypeScript?
mediumAdvanced 6 mins23. What are Index Signatures in TypeScript?
mediumTypes 6 mins24. What are Abstract Classes in TypeScript?
mediumOOP 6 mins25. What are Access Modifiers in TypeScript?
easyOOP 6 mins26. What is the Non-Null Assertion Operator in TypeScript?
mediumTypes 6 mins27. What is the satisfies Operator in TypeScript?
hardAdvanced 7 mins28. What is the infer Keyword in TypeScript?
hardAdvanced 7 mins29. What is Strict Mode in tsconfig.json?
mediumTooling 6 mins30. What is Structural Typing in TypeScript?
mediumTypes 6 mins31. What are Types vs Interfaces in TypeScript?
easyFundamentals 5 mins32. What is a Generic in TypeScript?
easyFundamentals 5 mins33. What is an Enum in TypeScript?
easyFundamentals 5 mins34. What is Type Inference in TypeScript?
easyFundamentals 5 mins35. What is any vs unknown in TypeScript?
easyType System 5 mins36. What is a Tuple in TypeScript?
mediumType System 6 mins37. What are Decorators in TypeScript?
mediumAdvanced Features 6 mins38. What is a Mapped Type in TypeScript?
mediumAdvanced Types 6 mins39. What is a Namespace in TypeScript?
mediumModules 6 mins40. What is Declaration Merging in TypeScript?
mediumType System 6 mins41. What Is the never Type in TypeScript?
hardType System 6 mins42. What Is a Type Guard in TypeScript?
hardType System 6 mins43. What Is a Conditional Type in TypeScript?
hardAdvanced Types 7 mins44. Interface vs Type Alias in TypeScript: What's the Difference?
hardType System 7 mins45. What Are Template Literal Types and When Are They Worth Using?
hardAdvanced Types 8 mins46. How Does Key Remapping With the as Clause Work in Mapped Types?
hardAdvanced Types 8 mins47. Why Do Conditional Types Distribute Over Unions, and How Do You Stop It?
hardAdvanced Types 8 mins48. Why Are Method Parameters Checked Bivariantly While Function Properties Are Not?
hardType System 8 mins49. What Is Declaration Merging and Which Declarations Actually Merge?
hardModules and Declarations 8 mins50. How Do You Safely Add Types to a Third-Party Module With Module Augmentation?
hardModules and Declarations 8 mins51. How Would You Migrate a Large Codebase to strictNullChecks?
hardConfiguration and Migration 9 mins52. When Do You Use satisfies Versus as Versus a Plain Type Annotation?
mediumType System 8 mins53. What Are Assertion Functions and How Do They Differ From Type Predicates?
hardType Narrowing 8 mins54. How Do You Get Nominal Typing in TypeScript With Branded Types?
hardType System 8 mins55. Why Does TypeScript Sometimes Infer the Wrong Type Argument for a Generic?
hardGenerics 9 mins56. Why Does TypeScript Pick the Wrong Overload, and How Do You Debug It?
hardFunctions 8 mins57. How Do Project References Improve Build Performance in a TypeScript Monorepo?
hardBuild and Tooling 8 mins58. How Do You Type an Untyped npm Package Without Using any?
mediumModules and Declarations 7 mins59. Which TypeScript Constructs Survive to Runtime and Which Are Erased?
mediumCompilation 8 mins60. Why Does an Object Literal Error on an Extra Property but a Variable Does Not?
mediumType System 7 mins61. What Causes 'Type Instantiation Is Excessively Deep and Possibly Infinite'?
hardCompiler Performance 8 mins