// ❌ The type used for 'role' is too broad
type User {
role: string;
}
// ✅ Using a union type narrows the possible values
// The code is now more understandable, and your editor
// will be able to provide improved auto-completion.
type User {
role: 'editor' | 'viewer' | 'admin';
}