-
Notifications
You must be signed in to change notification settings - Fork 189
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
remove PropertyAssignament from ObjectLiteralExpression #342
Comments
Nope. Looks like that was never implemented (same for |
thanks! nice to know - will PR then. Idea / suggestion - from my point of view (user manipulating the AST) exporting removeChildren() (/src/manipulation/manipulations/removal.ts) would give a lot of flexibility. I know is low level - and I know is one more signature to maintain backwards compatibility - but this would be very very useful for advanced users . These things could be exported in a "lowLevel" namespace or something like that to not disturb common users :P .. the same applies to other utilities in manipulations/ my two cents. |
aside question - I feel like there should be a couple extra interfaces for this kind of artificialities. For example, Removable (for this case), StructureFillable (fill), StructureGetable (getStructure) (and a couple more that I can't remember now), Also typeguards for those would be nice. I wonder if you agree with this.... |
I'd rather implement it for the scenario and have people submit pull requests/report an issue when something's not implemented. That way everyone can benefit. Additionally, there can be a lot of edge cases and exposing |
I missed a few things in the review so did a new commit. This should be good to go so I'm doing a release now. |
Hello, before throwing myself to the water and implement it, I would like to know if there is some way of removing a
PropertyAssignament
from anObjectLiteralExpression
, example:given an object literal
{name: 'seba', lastname: 'gurin'}
and I want to remove property 'name' so the resulting object is
{lastname: 'gurin'}
Thanks in advanced
The text was updated successfully, but these errors were encountered: