I have two constants, something like
const colors = {
a: '',
b: '',
c: '',
};
const variations = {
100: '',
200: '',
300: '',
}
And I want to create a type from these two objects keys that accepts a.100
, a.200
, a.300
, b.100
, b.200
, b.300
, c.100
and so on, something like
const colorVariations: ThisTypeNameHere = 'a.100'; // good
const colorVariations: ThisTypeNameHere = 'b.200'; // good
const colorVariations: ThisTypeNameHere = 'c.100'; // good
const colorVariations: ThisTypeNameHere = 'a200'; // bad
const colorVariations: ThisTypeNameHere = 'a.950'; // bad