import type { ConfigAll } from '../../types/command-all.ts'; export type MatrixSample = ConfigAll> = { [P in keyof T]?: T[P]; }; export type Matrix = ConfigAll> = Record>; export type MatrixInput = ConfigAll> = { [P in keyof T]?: T[P][]; }; type AdditionalValue, K extends keyof T> = { value: T[K]; additional?: MatrixSample; } | T[K]; export type MatrixAdditionalInput = ConfigAll> = { [P in keyof T]?: AdditionalValue[]; }; /** * Create a matrix from a options * @example * const matrix = fromMatrix({ a: [true, false], b: [true, false] }); * // { * // 'a(true)-b(true)': { a: true, b: true }, * // 'a(true)-b(false)': { a: true, b: false }, * // 'a(false)-b(true)': { a: false, b: true }, * // 'a(false)-b(false)': { a: false, b: false }, * // } */ export declare const fromMatrix: = ConfigAll>(configMatrix: MatrixInput) => Matrix; /** * Apply new matrix value to existing matrix * @example * const matrix = extendMatrix(fromMatrix({ initialMatrix: [true, false] }), { toBeMerged: [true, false] }); * // { * // 'initialMatrix(true)-toBeMerged(true)': { initialMatrix: true, toBeMerged: true }, * // 'initialMatrix(false)-toBeMerged(false)': { initialMatrix: false, toBeMerged: false }, * // } */ export declare const extendMatrix: = ConfigAll, A extends Record = ConfigAll>(matrix: Matrix, configMatrix: MatrixAdditionalInput) => Matrix; export declare const extendFilteredMatrix: = ConfigAll, A extends Record = ConfigAll>(matrix: Matrix, filter: (sample: MatrixSample) => boolean, extendedConfig: MatrixAdditionalInput) => Matrix; export declare const buildSamplesFromMatrix: (samples: Record>, { commonConfig }?: { commonConfig?: Record; }) => Record>; export {};