Dashboard

TypeScript

Choose a question track. Theory builds the concepts; debugging applies them to code and real problems.

Code-focused scenarios that ask you to diagnose behavior and choose a practical fix.

TypeScriptยท Debugging & Problem SolvingSenior
Question 1 of 4
Code
ts
type State = {
  status: "idle" | "loading" | "success" | "error";
  data?: User;
  error?: string;
};

Which type definition lets TypeScript narrow `data` safely after checking `status`?

Help us improve CodingReady

Allow anonymous analytics to help us understand practice usage. You can reject analytics and continue using the site.