Here the stmt object contains a property 'ast' that is defined as a AST (or specifically a Select)
However, when I look at the actual object generated from the astify() function, I see that the stmt object itself is the AST object, i.e. as if the interface should have been like this:
I much prefer the original definition of the interface, as it is very practical to always have a property named "ast" whenever there is an AST object. This makes it very easy to quickly parse through the output from astify() and find all ast named properties and parse these AST objects.
Hi,
I noticed that the interface (in the types.ts.d file) for a WITH statement, it is defined like this:
Here the stmt object contains a property 'ast' that is defined as a AST (or specifically a Select)
However, when I look at the actual object generated from the astify() function, I see that the stmt object itself is the AST object, i.e. as if the interface should have been like this:
I much prefer the original definition of the interface, as it is very practical to always have a property named "ast" whenever there is an AST object. This makes it very easy to quickly parse through the output from astify() and find all ast named properties and parse these AST objects.