Ability to insert/add clauses into a switch statement
Open
domain: manipulation
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Need to think this through...
```ts
const switchStatement = ...;
switchStatement.insertClause(0, {
caseLabel: "5",
body: "console.log(5);" // or writer => writer.writeLine(5);
});
switchStatement.insertClause(0, {
caseLabel: "9"
});
switchStatement.insertClause(0, {
isDefault: true // i don't really like this...
});
```
Contributor guide
Assessment
This issue has not been assessed yet.