( obj: Record<K, any>, )
| 12 | } from '@openpanel/constants'; |
| 13 | |
| 14 | export function objectToZodEnums<K extends string>( |
| 15 | obj: Record<K, any>, |
| 16 | ): [K, ...K[]] { |
| 17 | const [firstKey, ...otherKeys] = Object.keys(obj) as K[]; |
| 18 | return [firstKey!, ...otherKeys]; |
| 19 | } |
| 20 | |
| 21 | export const mapKeys = objectToZodEnums; |
| 22 |
no outgoing calls
no test coverage detected