Skip to content
New issue

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

lambda: stable and all deps are constants? Constant. #2328

Open
benjie opened this issue Jan 20, 2025 · 0 comments
Open

lambda: stable and all deps are constants? Constant. #2328

benjie opened this issue Jan 20, 2025 · 0 comments

Comments

@benjie
Copy link
Member

benjie commented Jan 20, 2025

If a lambda is sync and safe and only dependent on constants and has no side effects and is pure then we should be able to replace it with a constant?

Regarding "is pure" we can check this ourselves with babel if we want - essentially we need to ensure it contains no variable references outside its own scope (including references to this!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🌳 Triage
Development

No branches or pull requests

1 participant