Skip to content

Cleanup NodePath methods #16443

@nicolo-ribaudo

Description

@nicolo-ribaudo

There are a lot of methods on NodePath that aren't really meant to be public -- it's just that we expose all the function exported by the internal files that implement the various NodePath actually-public methods.

We should go through all of them and only expose those that are actually used outside of @babel/traverse, ideally with an explicit list rather than doing

Object.assign(
NodePath_Final.prototype,
NodePath_ancestry,
NodePath_inference,
NodePath_replacement,
NodePath_evaluation,
NodePath_conversion,
NodePath_introspection,
NodePath_context,
NodePath_removal,
NodePath_modification,
NodePath_family,
NodePath_comments,
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions