SpinTheMic
Pro

Interview practice question

Sharing types between frontend and backend

Frontend Engineering · TypeScript · Intermediate

Your frontend and backend are both in TypeScript, but types are duplicated and drift. How do you share them?

What a strong answer covers

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

  • Shared package in monorepo.
  • Generate from API spec (OpenAPI) or schemas.
  • End-to-end typed RPC (tRPC) if appropriate.
  • Avoid leaking server internals.
  • Versioning for separate deploys.
Practise this topic

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

See all topics