Transform Union to Records

Typescript

https://chat.openai.com/share/b16ce73f-41e1-4dcf-80b8-ae6e66b1a603

How to transform a Typescript Union to a Record. Useful for library devs