TypeScriptInterview preparation
TECHNOLOGY INTERVIEW GUIDE

TypeScript interview preparation.

Turn your understanding into examples, reasoning, and clear trade-offs.

PREPARE WITH ACTIVE RECALL

Explain before you reveal.

Choose a level, explore explained answers, then try a focused session.

Practice TypeScript
Difficulty
Question type

6 questions

Interface vs type: which should I use?

TypeScript·TypeScript

Interfaces and type aliases both describe types that TypeScript checks before runtime. An interface is mainly used for object contracts, while a type alias can name object shapes, unions, tuples and other type expressions. Choosing between them is mostly about the shape being modeled and whether declaration merging is needed.

Intermediate2 min read

What are generics and utility types?

TypeScript·TypeScript

Generics let a function, class or type work with different types while preserving relationships between inputs and outputs. Utility types transform existing types so the same fields do not need to be manually repeated. This reduces duplication without throwing away type information through any.

Intermediate2 min read

What are union, intersection, keyof and typeof?

TypeScript·TypeScript

A union allows a value to match one of several types, while an intersection requires it to satisfy all included types. keyof extracts property names from a type, and TypeScript's type-position typeof derives a type from a value declaration. Together they help express safe property access and reusable contracts.

Intermediate2 min read

What are unknown, any and never?

TypeScript·TypeScript

any allows operations without normal type checking, while unknown accepts any value but requires checks before use. never represents a situation where no value is possible, such as the result of a function that always throws. These types describe different levels of knowledge and should not be used interchangeably.

Intermediate2 min read

How do narrowing and type guards work?

TypeScript·TypeScript

Narrowing is TypeScript's process of reducing a broad type to a more specific type based on control flow and checks. A type guard is a check that gives the compiler evidence about a value, such as typeof, in or a custom predicate. Correct guards help application code safely use data that starts out uncertain.

Intermediate2 min read

What are mapped types, conditional types and decorators?

TypeScript·TypeScript

Mapped types build a new type by visiting the keys of another type, and conditional types choose a type based on a type relationship. Decorators are different: they run as part of JavaScript class definition and can add metadata or change behavior. Type transformations disappear during compilation, while decorator code can affect runtime behavior.

Intermediate2 min read

Difficulty is editorial guidance. These questions are not a ranking of interview frequency.

All TypeScript interview questions by concept

Use the filters above for a practice selection, or follow the full question directory below. Each answer includes its source and explanation; difficulty labels are editorial guidance.

Prerequisites
Related to TypeScript
Expand your skills next