Closed wingrunr21 closed 6 years ago
Thanks for the great work and explanation @wingrunr21. I feel bad that I'm doing such a bad job at maintaining this as I make changes. It's because I don't personally use TypeScript.
We should really add some step to CI that makes sure that this file is valid. Do you have an idea of what that code would look like? One option would be to add it to the tree-sitter-cli
CI build; that's where the tests are currently run, because the tests use both the CLI and this library.
I think a very quick typescript file that imports tree-sitter
and checks for a clean compile should work. Typescript complained very quickly about the type definitions.
I think the harder part will be to make sure the various types stay in sync with the underlying native implementation.
I can give a CI PR a go if you'd like. I'm working to integrate this + the Ruby grammar into vscode-ruby so we'll be consuming it via Typescript.
These changes:
Edit
was wrong,Document
was still being referred to, etc)The correct way to do Typescript imports is now like this: