Suppose there is an indexed type:
type X = {
a: 'A',
b: 'B'
}
Is there a way to derive the following type from it:
type V = 'A' | 'B'
without using an explicit method like this:
type V = X['a'] | X['b']
What I am looking for is something similar to using keyof
(for obtaining a keys union type), but for values.