Better API for dealing with IfStatements
Open
enhancement
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Questions:
1. How would someone insert comments?
2. How would someone remove only a single `else if` block or just the first `if` block?
Note how the ast looks like:

I'm thinking this will most likely be an api on top of the existing one.
For removing, the problem is that people approaching this would not expect removing an if statement to remove all the following else blocks. It might be better to do a breaking change here and have it only remove the if statement for the current one or have a new `removeIfBlock()` method.
Contributor guide
Assessment
This issue has not been assessed yet.