AI Interview

TypeScript Interview - Intermediate Level

For developers with 2-4 years of TypeScript experience. Master advanced types, utility types, generics, type guards, and TypeScript best practices.

25-30 minutes

2-4 years of TypeScript experience

Start AI Interview

Who is this for?

  • Mid-level TypeScript developers

  • Full-stack developers using TypeScript

  • Developers building type-safe applications

  • Those preparing for mid-senior TypeScript roles

What you'll practice

  • Using union and intersection types

  • Creating discriminated unions

  • Writing generic functions and classes

  • Applying utility types effectively

  • Implementing type guards

  • Working with advanced type patterns

Topics covered

Advanced Types

  • Union types

  • Intersection types

  • Discriminated unions

  • Literal types

Generics

  • Generic functions

  • Generic constraints (extends)

  • Multiple type parameters

  • Generic interfaces

Utility Types

  • Partial, Required, Readonly

  • Pick, Omit, Exclude

  • Record, ReturnType

  • Parameters, ConstructorParameters

Type Guards & Narrowing

  • typeof and instanceof

  • Custom type predicates

  • Discriminated unions pattern

  • Nullish coalescing

Example questions

Q:

What are discriminated unions and when would you use them?

Q:

How do you create a generic function with constraints?

Q:

Explain the difference between Pick and Omit utility types

Q:

How do type guards work in TypeScript?

Q:

What is the purpose of the extends keyword in generics?

Q:

How would you make all properties of an object optional?

Preparation tips

  • Master union and intersection types

  • Practice writing generic functions

  • Learn all built-in utility types

  • Understand type narrowing techniques

  • Build type-safe APIs

  • Study TypeScript with React (if applicable)

Continue your journey

Start Your Intermediate Interview Now

Free • No signup required • AI-powered