/** * Ensure the prop has a value (i.e. treat it as required) when a given sibling prop * also has a value, and ensure the prop is of the correct prop-type * @param {function} siblingPropName - The name of the sibling prop * @return {Error|null} Returns null if all conditions are met, or an error * @example * import { requiredIf } from '@dhis2/prop-types' * * const Test = ({ someBool, someString }) => ( *
*

someBool: {someBool ? 'true' : 'false'}

*

someString: {someString}

*
* ) * Test.propTypes = { * someBool: propTypes.bool, * someString: requiredIf(props => props.someBool, propTypes.string), * } */ export declare const requiredIf: (condition: any, propType: any) => any;