Hello everyone, I should've probably split this in two separate posts as they're two separate issues. The code has comments that describe the issues, but in summary,
- My union types are not properly being inferred when using a switch statement, I have a mapping of
key -> valueand when I switch on thekeyi still get a union ofvalue | value2 | value3 ... - I want to support having keyof T, but also allow any string, which when written as
T extends keyof T | stringloses the autocompletion for the IDE
on any of their messages