Closed jrvidal closed 24 minutes ago
tree-sitter --version
7b4275d077ae196fc0ce42ab3ad091574e3ec519
I'm getting highlight errors on some type definitions, and it seems like the cause is here, upstream.
type Foo = import('node:fs').ReadStream & { bar(); };
(program [0, 0] - [3, 0] (type_alias_declaration [0, 0] - [0, 17] name: (type_identifier [0, 5] - [0, 8]) value: (type_identifier [0, 11] - [0, 17])) (expression_statement [0, 17] - [2, 2] (binary_expression [0, 17] - [2, 1] left: (member_expression [0, 17] - [0, 39] object: (parenthesized_expression [0, 17] - [0, 28] (string [0, 18] - [0, 27] (string_fragment [0, 19] - [0, 26]))) property: (property_identifier [0, 29] - [0, 39])) right: (object [0, 42] - [2, 1] (ERROR [1, 2] - [1, 8] (property_identifier [1, 2] - [1, 5]) (formal_parameters [1, 5] - [1, 7])))))) repro.ts 0.15 ms 370 bytes/ms (MISSING ";" [0, 17] - [0, 17])
As far as I can tell this is valid TypeScript (see playground link below), so the parse tree should not contain errors.
Playground link
Did you check existing issues?
Tree-Sitter CLI Version, if relevant (output of
tree-sitter --version
)7b4275d077ae196fc0ce42ab3ad091574e3ec519
Describe the bug
I'm getting highlight errors on some type definitions, and it seems like the cause is here, upstream.
Steps To Reproduce/Bad Parse Tree
Expected Behavior/Parse Tree
As far as I can tell this is valid TypeScript (see playground link below), so the parse tree should not contain errors.
Repro
Playground link