In typescript, is it possible to create a new union type from all the possible results of the addition of two union types? The idea would be like this:
type T1 = 0 | 1 | 2;
type T2 = 10 | 20;
type T3 = T1 + T2; // same as type T3 = 10 | 11 | 12 | 20 | 21 | 22
My goal is to create a new Map() with a key that accepts [T1, T2] but since maps don't work with arrays as keys, I need to encode it first by combining the two types into some serialized form.