Skip to content

Commit

Permalink
fix: reduce work in loop (#2026)
Browse files Browse the repository at this point in the history
## PR Checklist

- [ ] Addresses an existing open issue: fixes #000
- [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

Make the case for the void type
mutually exclusive with the other
check in the loop.

Suggested in
#2025 (comment).
  • Loading branch information
pjonsson authored Nov 30, 2024
1 parent 6bfc044 commit e53514f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/mutations/collecting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ const findMissingTypes = (
// The 'void' type shouldn't be assigned to anything, so we ignore it
if (assignedType.flags === ts.TypeFlags.Void) {
remainingMissingTypes.delete(assignedType);
}

if (!isAssignedTypeMissingFromDeclared(assignedType)) {
} else if (!isAssignedTypeMissingFromDeclared(assignedType)) {
remainingMissingTypes.delete(assignedType);
}
}
Expand Down

0 comments on commit e53514f

Please sign in to comment.