(record: T)
| 19 | * @param record |
| 20 | */ |
| 21 | export function transformRecordToOption<T extends Record<string, string>>(record: T) { |
| 22 | return Object.entries(record).map(([value, label]) => ({ |
| 23 | value, |
| 24 | label |
| 25 | })) as CommonType.Option<keyof T, T[keyof T]>[]; |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Translate options |