Skip to content

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

Open
@benjie

Description

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!)

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status

      🌳 Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions