-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Different behavior exhibited between homomorphic mapped types #44850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm not sure but it seems like an intended behavior caused by an unwritten rule. According to #23345 (comment), homomorphic mapped types are also distributive, though this behavior is never mentioned in the documentation. If |
That would explain the behavior, but I don't exactly understand why the behavior in |
I guess this is because |
I had seen that in the documentation, but it describes what happens in the case of a conditional type, of which this is not, but you are right that the behavior seems pretty much in line with what is described there. |
This issue has been marked 'Working as Intended' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Bug Report
🔎 Search Terms
mapped, generic, string, union
🕗 Version & Regression Information
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Test examples 1 and 2 produce different types.
🙂 Expected behavior
Behavior should be consistent between the first two test examples.
The text was updated successfully, but these errors were encountered: