// from
const obj = {
a: {
aa: 'A',
cc: 'C',
},
b: {
bb: 'B',
cc: 'C',
}
} as const;
// to
type ObjValue = 'A' | 'B' | 'C';
Hi, I want to get union type from object.
So I tried with typeof obj[keyof typeof obj] pattern, but it just returns this.
type ObjValue = 'C'
How do I get the union type composed only string values of object without String indexing?