@carbon/react
Version:
React components for the Carbon Design System
17 lines (16 loc) • 695 B
TypeScript
/**
* Copyright IBM Corp. 2016, 2025
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import type { Validator, ValidationMap } from 'prop-types';
/**
* Returns a set of prop-type validators that enforce at least one of the
* specified props must be provided.
*
* @param propTypes - An object of prop-type validators. The keys of the object
* are the names of the props, and the values are the prop-type validators.
* @returns A new object of wrapped prop-type validators.
*/
export declare const isRequiredOneOf: <T extends Record<string, Validator<any>>>(propTypes: T) => ValidationMap<any>;