-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Add a proper non-inferrable type #30856
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
Conversation
@typescript-bot test this |
Heya @RyanCavanaugh, I've started to run the extended test suite on this PR at 791f56d. You can monitor the build here. It should now contribute to this PR's status checks. |
RWC shows two new errors (in one file) and one instance where a single large error became three smaller errors. It's not obvious without a full enlistment what's going on as the target type is defined outside the erroring file. |
}); | ||
|
||
const myReducer2 = combineReducers({ | ||
>myReducer2 : Reducer<{ combined: { foo: any; }; }> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this supposed to be Reducer<{ combined: { foo: number; }; }>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's supposed to be Reducer<{ combined: { foo: Reducer<number> } }>
, but we never elaborate more than one level of reverse mapped types, thus the any.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhhhhh, right. I thought we printed those with ...
now, rather than any
, but that may only be for quickinfo...
@RyanCavanaugh Looked through the new RWC errors. They all look good. The case of one error turning into three is because we're now elaborating into the object literals instead of reporting at the top level. The two new errors are correct excess property checks that previously were masked by bad inferences. |
Add a proper non-inferrable type
Fixes #30685.