export type Union = T[keyof T]; export const popularChargingTimeType = { DEFAULT: { index: 0, text: 'default', description: '기본값', }, MAX: { index: 1, text: 'max', description: '최댓값', }, MIN: { index: 2, text: 'min', description: '최솟값', }, } as const; export type PopularChargingTimeType = Union; export interface PopularChargingTime { data: number; type: PopularChargingTimeType['index']; }