refactor: update roleTypeMap type definition for improved clarity

v3.2
wxg0103 2025-07-11 20:45:23 +08:00
parent 2bda87b5a7
commit 0f4ebc5981
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import {t} from '@/locales'
import useStore from '@/stores'
const {user} = useStore()
export const roleTypeMap: Record<RoleTypeEnum, string> = {
export const roleTypeMap: { [RoleTypeEnum.USER]: string; [RoleTypeEnum.WORKSPACE_MANAGE]: string } = {
...(user.is_admin()
? {
[RoleTypeEnum.ADMIN]: t('views.role.systemAdmin'),