fix(scope-manager): correct analysis of inferred types in conditional types #2537
Thanks for the PR, @dinofx!
typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.
The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.
@@ Coverage Diff @@ ## master #2537 +/- ## ======================================= Coverage 92.82% 92.82% ======================================= Files 290 290 Lines 9505 9506 +1 Branches 2664 2664 ======================================= + Hits 8823 8824 +1 Misses 323 323 Partials 359 359
Flags with carried forward coverage won't be shown. Click here to find out more.
bradzacher left a comment
Fix itself LGTM!
To help prevent regressions, could you please add a new snapshot test into
The test should be something like:
type Test<T> = T extends Array<infer U> ? U : T extends Set<infer U> ? U
Then you can
If you're not sure what to look for, just push the snapshot and I will be able to verify it.
… types (typescript-eslint#2537) Co-authored-by: Brad Zacher <email@example.com>