-
Notifications
You must be signed in to change notification settings - Fork 41
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
🐛 Bug: noInferableTypes removes incorrectly type from Map variable #1512
Comments
<!-- 👋 Hi, thanks for sending a PR to TypeStat! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Addresses an existing open issue: fixes #1454 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/TypeStat/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/TypeStat/blob/main/.github/CONTRIBUTING.md) were taken ## Overview <!-- Description of what is changed and how the code change does that. --> - Refactor file reading in testSetup.ts - Fix reading tsConfig settings Some files changed to be what they should be, and some are now exposing bugs (`test/cases/fixes/incompleteTypes/returnTypes/expected.ts`) . I'm not sure why the type is being removed in `test/cases/fixes/noInferableTypes/variableDeclarations/expected.ts` but I think this is also exposing some type. Or it may be that Map would need some different tsconfig settings. - Filed new issue about it #1512
In However, then we go to So we need to have some better check somewhere to say that |
<!-- 👋 Hi, thanks for sending a PR to TypeStat! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Addresses an existing open issue: fixes #1512 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/TypeStat/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/TypeStat/blob/main/.github/CONTRIBUTING.md) were taken ## Overview <!-- Description of what is changed and how the code change does that. --> I'm not sure that this is correct place to place this code. It's also maybe too heavy handed. But on the other hand, I think it's better to prevent cases where we introduce implicit anys when there was some type earlier. Keeping types that could have been removed, is less bad in that case. I have tried to find what would be right place to do this check but I did not have any luck. --------- Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
Bug Report Checklist
main
branch of the repository.Expected
This code stays as it is
Actual
It changes to
Additional Info
This was uncovered with changes in #1511
typestat.json
tsconfig
The text was updated successfully, but these errors were encountered: