The type of test is Test<string>, I am trying to get the generic value to be Test<'test1' | 'test2' | 'test3' | 'test4'>.
The example is just the minimal version I could provide, in my real use case the object "values" are classes with generics themselves, and I need to create one generic type out of all of the classes inside a parent class if that makes easier to understand.