You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module.exports=functiontransformer(file,api){constj=api.jscodeshift;constroot=j(file.source);// Nothing! But isn't this exactly what the selector is supposed to find?constdecorators=root.find(j.Decorator);// A lot, but none of the decoratorsconstidentifiers=root.find(j.Identifier);// Finds the `@Field()` decorator, but also includes the `visualizations` property which is too much.constclassProperties=root.find(j.ClassProperty);returnroot.toSource();};
I want to find them and only them so I can remove those lines of code with j.remove(path).
How do I get a hold of the collection for
@Directive()
and@ObjectType()
andField()
decorator calls in this example?https://astexplorer.net/#/gist/96fa2a58a3c859d61278839d7b897f8f/acf963ec5bd8c96799d87bf4f8ccf6504c24c6d6
I have tried
I want to find them and only them so I can remove those lines of code with
j.remove(path)
.My config looks like this:
The text was updated successfully, but these errors were encountered: