typescript-go
typescript-go copied to clipboard
source file binary format is not work
Currently the @typescript/ast package provided via source file binary format cannot properly access simple ast.
like
function foo() {
console.log("hello", "world")
}
This failed for two reasons:
- when
FunctionDeclaration.parameteris empty but not nil, it will occupy a slot but will not generate correspond node. getOrCreateChildAtNodeIndexassume a linear layout, but that's not true.
I provided the test and fix in https://github.com/microsoft/typescript-go/pull/2006, but I reopened an issue to provide discoverability (I don't know if care about external contributions).