You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read all the tree-sitter docs if it relates to using the parser
I have searched the existing issues of tree-sitter-typescript
Tree-Sitter CLI Version, if relevant (output of tree-sitter --version)
No response
Describe the bug
I have been trying to get tree-sitter-typescript to work in javascript but i's not working always throwing the error Invalid language object but tree-sitter works well with tree-sitter-javascript and tree-sitter-python. here's my code :
const Parser = require('tree-sitter');
const Typescript= require('tree-sitter-typescript').typescript;
const parser= new Parser();
parser.setLanguage(Typescript);```
### Steps To Reproduce/Bad Parse Tree
```const path = require('path');
const Parser = require('tree-sitter');
const Typescript= require('tree-sitter-typescript').typescript;
const parser= new Parser();
parser.setLanguage(Typescript);```
### Expected Behavior/Parse Tree
```const path = require('path');
const Parser = require('tree-sitter');
const Typescript= require('tree-sitter-typescript').typescript;
const parser= new Parser();
parser.setLanguage(Typescript);```
### Repro
```TypeScript
// Example code that causes the issue
function foo() {
// Code that fails to parse, or causes an error
}
The text was updated successfully, but these errors were encountered:
I'm pretty sure this is because this package has not been updated to be compatible with tree sitter v21. I'm having a similar problem with the Rust crate - the Language struct is incompatible with tree-sitter v21
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)No response
Describe the bug
I have been trying to get tree-sitter-typescript to work in javascript but i's not working always throwing the error Invalid language object but tree-sitter works well with tree-sitter-javascript and tree-sitter-python. here's my code :
The text was updated successfully, but these errors were encountered: