-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Lodash's mapValues and empty object type interact confusingly #29901
Comments
I think this might caused by the same issue in #29393. |
@jack-williams that seems likely, but I'll keep the issue open and leave it up to the maintainers to judge if that is the case. |
Oh boy. So this strangeness really is strange. All that differs from the |
Ahh the type ids. An amateur mistake by me there to overlook that one, haha. |
It's probably also worth noting that I believe by our normal subtype reduction rules, |
Hah, what a bug. Thanks for the explanation @weswigham! |
I had trouble coming up with a good name and search terms for this issue. It looks like it's triggering some heuristic that is misbehaving and is very strange. Please feel free to rename if you can come up with a better summary for it.
TypeScript Version: 3.3.1
Search Terms: mapvalues ternary side effect unused inference empty object type
Code
Expected behavior: fails to compile without the
const wat
line present.Actual behavior: only fails to compile when
const wat
is present.Playground Link: link
Related Issues:
The text was updated successfully, but these errors were encountered: