feat: add util

This commit is contained in:
Sergey Krylov 2026-02-08 10:04:14 +03:00
parent e7d933e6e9
commit ee94bda295
3 changed files with 5 additions and 1 deletions

View File

@ -1,2 +1,2 @@
export * from './utils'
export * from './enums' export * from './enums'

View File

@ -0,0 +1,3 @@
export function convertEnum<T extends object>(target: T, value: string): T[keyof T] {
return (target as any)[value]
}

1
src/lib/utils/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './convert-enum.util'