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
Regression: Promise-related type inferencing failing in 2.4.1 #16940
Comments
@jiaweihli could you share the small repo of the issue? also from reading the description, I think this may be the cause (https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#stricter-variance-in-callback-parameters) |
Here is the full branch I repro'd this on: https://github.com/jiaweihli/monapt/commits/upgrade-to-ts-2.4 |
😖 |
The code is open-source, and I documented each step I took in a separate commit. Each of these has also been run independently through CI. Do you still need a small repro? |
I am not part of the TypeScript team, but I think the answer will be yes. It is like saying "go read through the TypeScript source code to find your issue, it is open source, all the commits are there." |
Similar to DefinitelyTyped/DefinitelyTyped#11027 |
TypeScript Version: 2.4.1
After upgrading from 2.3.4, some tests fail to inference correctly. An overloaded method that's called resolves to the wrong version, and the only workaround I can find is explicitly declaring the correct variable type to choose the correct overloaded method.
Here is a repo/branch/CI with a repro:
master
on 2.3.4Each CI run is a single commit, you can jump to the Github links to see what changed.
The text was updated successfully, but these errors were encountered: