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
Would be great to get some docs on these! The current documentation defines things with themselves, and there is no explanation on how to use them.
For instance, filter(j.ImportSpecifier)'s result do not contain the actual specifier. filter(j.ImportDeclaration)'s result does, but then re-composing a replacement is 🤯
@JakobJingleheimer agreed. I'll work on this soon. The current AST Grammar doc was supposed to be just an exhaustive reference of all the node type definitions rather than a usage guide. I'm wondering if that's even useful since it's not likely someone will need a list of node types in a doc format because:
they're already defined in the source code
tools like Codemod Studio and AST Explorer already allow users to know what node type a piece of code is
Should we have a doc with example usages of different node types instead? What's the ideal experience you want to see here?
Document utility methods for import specifiers as described in #611.
The text was updated successfully, but these errors were encountered: