import { Errors } from './common.js';
const VALID_VISIBILITIES = new Set(['public', 'private']);
export function assertVisibility(value) {
    if (typeof value !== 'string' || !VALID_VISIBILITIES.has(value)) {
        throw (new Errors.InvalidMetadata(`visibility must be 'public' or 'private'`));
    }
    // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
    return value;
}
//# sourceMappingURL=utils.js.map