gen-jhipster
Version:
Spring Boot + Angular/React/Vue in one handy generator
33 lines (32 loc) • 1.25 kB
TypeScript
/**
* 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: (configMatrix: Record<string, any[]>) => {
[k: string]: any;
};
/**
* 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: (matrix: any, configMatrix: any) => {
[k: string]: any;
};
export declare const extendFilteredMatrix: (matrix: any, filter: any, extendedConfig: any) => {
[k: string]: unknown;
};
export declare const buildSamplesFromMatrix: (samples: Record<string, Record<string, unknown>>, { commonConfig }?: {
commonConfig?: Record<string, unknown>;
}) => Record<string, Record<string, unknown>>;