JoshuaKGoldberg / JoshuaKGoldberg/TypeStat
Incomplete union function types fixer doesn't wrap original function in parenthesis
Open
area: fixers
good first issue
status: accepting prs
type: bug
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 47
- Avg merge
- 15h 55m
- Merged PRs (30d)
- 21
Description
### 🐛 Bug Report
- TypeStat version: 0.4.1
- TypeScript version: 4.1.2
- Node version: N/A
#### Actual Behavior
```diff
- let returnsEither: () => string;
+ let returnsEither: () => string | (() => number);
returnsEither = () => "";
returnsEither = () => 7;
```
#### Expected Behavior
The `() => string` should be wrapped in `()` too.
#### Reproduction
See ☝️
Contributor guide
Assessment
This issue has not been assessed yet.