Add cloneDeepWithoutLoc #10670
Labels
claimed
good first issue
Has PR
i: enhancement
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: types
I had a need for a
t.cloneDeepWithoutLoc
function today. We have at.cloneDeep
and at.cloneWithoutLoc
(both deprecated, but that's OK), but we do not have at.cloneDeepWithoutLoc
.These functions all live in https://github.com/babel/babel/tree/bdb4318f47ec42ca4e325b5163e2e8ad57de4849/packages/babel-types/src/clone.
They are exported publicly at
babel/packages/babel-types/src/index.js
Lines 19 to 23 in bdb4318
We can add the functionality as a new optional-boolean parameter
t.cloneNode
. Let's call itwithoutLoc
. While we're add it, we can updatet.cloneWithoutLoc
to use this new parameter.Let's also add tests, and flow and typescript types.
The text was updated successfully, but these errors were encountered: