Readonly and As Const
Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.
The problem
- medium
- Pro
A config object lists the allowed user roles, but functions accept any string as a role, and somewhere the list is accidentally modified. Explain how readonly types and the as const assertion would help, and how you'd derive the role type from the list.
Talk this problem through with an AI coach
This is a Pro challenge. Sign in with Google, then upgrade to start a voice session.