type ElementType = A extends ReadonlyArray ? T | undefined : never; type ElementsOfAll = []> = Inputs extends readonly [infer F, ...infer M] ? ElementsOfAll]> : R; type CartesianProduct = ElementsOfAll[]; /** * Get the cross product or Cartesian product of a list of groups. The * implementation is copied, with some modifications, from * https://stackoverflow.com/a/72059390/159388. * @param sets A list of groups of elements * @returns A list of all possible combinations of one element from each group * in sets. Empty groups will result in undefined in that slot in each * combination. */ export declare function crossProduct>>(sets: Sets): CartesianProduct; export {};