* Validates that a usage set is not empty. * @param {SafeSet } usagesSet * @returns {SafeSet }
(usagesSet)
| 71 | * @returns {SafeSet<string>} |
| 72 | */ |
| 73 | function validateUsagesNotEmpty(usagesSet) { |
| 74 | if (usagesSet.size === 0) { |
| 75 | throw lazyDOMException( |
| 76 | 'Usages cannot be empty when creating a key.', |
| 77 | 'SyntaxError'); |
| 78 | } |
| 79 | return usagesSet; |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Returns the requested usages that are present in `usagesSet`. |
no test coverage detected
searching dependent graphs…