We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Babili could use an @pure JSDoc tag to determine which functions are pure, then remove unused calls to them.
@pure
AST Explorer with code + example: https://astexplorer.net/#/gist/bdcbc34df3916d324454a332988503c7/7c39cede7af9cc9244f89876bb8339a5a4fb3d37
In:
/** @pure */ const myPureFunc = () => {} myPureFunc()
Out:
/** @pure */ const myPureFunc = () => {}
The text was updated successfully, but these errors were encountered:
Instead of @pure Babili could use #__PURE__, like Uglify: mishoo/UglifyJS#1448, babel/babel#5632
#__PURE__
Sorry, something went wrong.
This is a similar request to babel/babel#5632? Referencing the same issue too. I'm already in favor of doing it
Sort of — this one will strip out calls to pure functions, while that one wants to add an annotation to functions wrapping transpiled classes.
Duplicate #520
No branches or pull requests
Babili could use an
@pure
JSDoc tag to determine which functions are pure, then remove unused calls to them.AST Explorer with code + example: https://astexplorer.net/#/gist/bdcbc34df3916d324454a332988503c7/7c39cede7af9cc9244f89876bb8339a5a4fb3d37
In:
Out:
The text was updated successfully, but these errors were encountered: