const ROLES = ["admin", "user", "guest"] as const; type Role = typeof ROLES[number]; function checkRole(role: Role) { console.log(`${role} 권한 확인`); } checkRole("admin");