UNPKG

@instructure/ui-test-utils

Version:

A UI testing library made by Instructure Inc.

15 lines 853 B
type Props<T> = T extends Record<string, infer V> ? Record<keyof T, V> : T; type ArrayElement<A> = A extends readonly (infer T)[] ? T : never; /** * Given possible values for each prop, returns all combinations of those prop values. * To generate the prop names and values from the component source see the `parsePropValues` utility * * @param {Object} propValues an object with the shape {propName: arrayOfPossibleValues} * @returns {Array} an array of all prop combinations [{propAName: propAValue, propBName: propBValue}] * * @module generatePropCombinations * @private */ export declare function generatePropCombinations<T extends Record<string, unknown>>(propValues: Props<T>): Record<keyof Props<T>, ArrayElement<Props<T>[keyof Props<T>]>>[]; export default generatePropCombinations; //# sourceMappingURL=generatePropCombinations.d.ts.map