(schema: MultiSelectEnumSchema)
| 65 | * Get values from a multi-select enum schema |
| 66 | */ |
| 67 | export function getMultiSelectValues(schema: MultiSelectEnumSchema): string[] { |
| 68 | if ('anyOf' in schema.items) { |
| 69 | return schema.items.anyOf.map(item => item.const) |
| 70 | } |
| 71 | if ('enum' in schema.items) { |
| 72 | return schema.items.enum |
| 73 | } |
| 74 | return [] |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Get display labels from a multi-select enum schema |
no outgoing calls
no test coverage detected