UNPKG

599 BTypeScriptView Raw
1/**
2 * Warns when props are required if a condition is met.
3 *
4 * @public
5 * @param componentName - The name of the component being used.
6 * @param props - The props passed into the component.
7 * @param requiredProps - The name of the props that are required when the condition is met.
8 * @param conditionalPropName - The name of the prop that the condition is based on.
9 * @param condition - Whether the condition is met.
10 */
11export declare function warnConditionallyRequiredProps<P>(componentName: string, props: P, requiredProps: string[], conditionalPropName: string, condition: boolean): void;