Is it possible to translate a type of this kind:
export type UnionType = {
element:
| { $case: 'a'; a: number }
| { $case: 'b'; b: string }
| { $case: 'c'; c: boolean };
};
to a type of a kind:
type OneOfConverter<T> = any; // TODO
type ObjectType = OneOfConverter<UnionType>;
// type ObjectType = {
// a: number;
// b: string;
// c: boolean;
// };