astring icon indicating copy to clipboard operation
astring copied to clipboard

Skip unknown node types

Open davidbonnet opened this issue 3 years ago • 1 comments

Discussed in https://github.com/davidbonnet/astring/discussions/587

Originally posted by stefanprobst November 14, 2021 hi @davidbonnet, what do you think about allowing to (optionally) skip unknown node types? for example the typescript nodes created by @typescript-eslint/typescript-estree. i know very little about asts, but maybe like this small change? thanks!

davidbonnet avatar Nov 21 '21 16:11 davidbonnet

The suggested change is incomplete though. IMHO, it would be more practical to transform the AST using a tool like astravel which would remove unknown nodes prior rendering them to actual code.

davidbonnet avatar Nov 21 '21 17:11 davidbonnet