SpinTheMic
Pro

Interview practice question

Choosing between interface and type for a data model

Frontend Engineering · TypeScript · Beginner

Your team argues about whether to use interface or type for data models. How would you decide?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Both work for object shapes.
  • Interfaces: extension, merging, clearer errors sometimes.
  • Types: unions, mapped/conditional types.
  • Choose convention and lint it.
  • Consistency over preference.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics