( schema: PrimitiveSchemaDefinition, )
| 50 | * Check if schema is a multi-select enum (`type: "array"` with `items.enum` or `items.anyOf`) |
| 51 | */ |
| 52 | export function isMultiSelectEnumSchema( |
| 53 | schema: PrimitiveSchemaDefinition, |
| 54 | ): schema is MultiSelectEnumSchema { |
| 55 | return ( |
| 56 | schema.type === 'array' && |
| 57 | 'items' in schema && |
| 58 | typeof schema.items === 'object' && |
| 59 | schema.items !== null && |
| 60 | ('enum' in schema.items || 'anyOf' in schema.items) |
| 61 | ) |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Get values from a multi-select enum schema |
no outgoing calls
no test coverage detected