Cartesian Product Type
with Index
type Records = { [S in Union1]: { [R in Union2]: SelectRecord<S, R>; }[Union2]; }[Union1];
Documentation - Mapped Types
Generating types by re-using an existing type.
https://www.typescriptlang.org/docs/handbook/2/mapped-types.html

Seonglae Cho