JoshuaKGoldberg / JoshuaKGoldberg/TypeStat

Incomplete union function types fixer doesn't wrap original function in parenthesis

Open
#768 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.