Inference on Mapped Types with Exhaustive Switch Possible?
Is it possible to get inference with an exhaustive switch with arktype using mapped types
For example, in the switch statement below im using mapped types to limit the possible type that can be inferred in each case. I want to try to get the type system to know that under each case only one possible type is possible so i want it to show me the correct fields i can select from

1 Reply
I'd say wait for match expressions which will be released this week. Seems like a much better fit for this use case from what I can tell