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, |
|
); |
There are a lot of methods on
NodePaththat aren't really meant to be public -- it's just that we expose all the function exported by the internal files that implement the variousNodePathactually-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 doingbabel/packages/babel-traverse/src/path/index.ts
Lines 220 to 233 in 941cee2