It's typed as BaseNode, but the possible results are some sort of of Node + INode mixed type (eg. ModuleSpecifier for import statements). The dependencies:
P.S. Also Svelte doesn't automatically include those types, you need to install more of the packages. This isn't ideal as you could miss-match the dependency versions. Maybe there is a conventional way to bundle types, without the need for the user to install svelte's sub-dependencies? 🤔
Hey, I'm using the svelte compiler to walk the AST. I'm using Typescript and it seems that the typings are wrong for the node that passed to the
walk
function - https://github.com/Rich-Harris/estree-walker/blob/master/src/async.js#L4It's typed as
BaseNode
, but the possible results are some sort of ofNode
+INode
mixed type (eg.ModuleSpecifier
for import statements). The dependencies:P.S. Also Svelte doesn't automatically include those types, you need to install more of the packages. This isn't ideal as you could miss-match the dependency versions. Maybe there is a conventional way to bundle types, without the need for the user to install svelte's sub-dependencies? 🤔