( e: any, t?: Translator, i18nKey?: string )
| 323 | } |
| 324 | |
| 325 | export const enumToEnumOptionMapper = ( |
| 326 | e: any, |
| 327 | t?: Translator, |
| 328 | i18nKey?: string |
| 329 | ): EnumOption => { |
| 330 | let label = typeof e === 'string' ? e : JSON.stringify(e); |
| 331 | if (t) { |
| 332 | if (i18nKey) { |
| 333 | label = t(`${i18nKey}.${label}`, label); |
| 334 | } else { |
| 335 | label = t(label, label); |
| 336 | } |
| 337 | } |
| 338 | return { label, value: e }; |
| 339 | }; |
| 340 | |
| 341 | export const oneOfToEnumOptionMapper = ( |
| 342 | e: any, |
no outgoing calls
no test coverage detected
searching dependent graphs…