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#L4

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:
{
"svelte": "^3.38.2",
"@types/estree": "^0.0.48",
"estree-walker": "^3.0.0"
}
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
walkfunction - 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+INodemixed type (eg.ModuleSpecifierfor import statements). The dependencies:{ "svelte": "^3.38.2", "@types/estree": "^0.0.48", "estree-walker": "^3.0.0" }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? 🤔