Interview practice question
Type-safe translation keys
Frontend Engineering · TypeScript · Experienced
Your app's translation keys are plain strings, and typos lead to missing text in production. How would you make them type-safe?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Generate types from translation files.
- Union of valid keys (nested via template literals).
- Typed interpolation params.
- i18n libraries with typing support.
- CI check for missing translations.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.