Add support for annotations improving minification and rewriting
Open
discussion
enhancement
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
Eg. ability to declare "pure" functions:
```
class Bar {
/* babili: no-side-effects */
constructor() {
someFunction(this);
}
}
new Bar();
```
Would result in removing `new Bar()` because of `no-side-effects` annotation.
Other possible annotations include: `dont-modify-argument`, `constant-expression`, `always-new` (function always return unique object - like `foo = ()=>({})` - all calls to `foo()` results in new objects) or similar.
Contributor guide
Assessment
This issue has not been assessed yet.