Advanced Code Reading #typescript #types #generics

🔷 TypeScript Interfaces & Types

3 exercises — read TypeScript interfaces and type definitions and describe them in plain English. Essential for code reviews, documentation, and onboarding.

0 / 3 completed
Describing TypeScript types — key phrases
  • "This is a generic type — the type parameter T allows it to work with any data type."
  • "This is a discriminated union — the success field is the discriminant that TypeScript uses to narrow the type."
  • "This mapped type iterates over each key of T and…"
  • "This utility type creates a version of T where every property is…"
  • "E defaults to Error if no second type argument is provided."
1 / 3
Read this TypeScript interface. Which plain-English description is most accurate and useful for a code review?
interface PaginatedResponse<T> {
  data: T[];
  total: number;
  page: number;
  pageSize: number;
  hasNextPage: boolean;
  hasPreviousPage: boolean;
}