Hi,
I just ran into the fact that (interface_declaration)'s body is an (object_type)
Basically it seems unexpected/inconvenient that then there's no (easy) way to target just "object type literals" eg in a tree-sitter query (since if you do a query for (object_type) it will also capture the {...} part of interface declarations, which conceptually seems like a very different thing than an object type literal)
So from my limited understanding of tree-sitter grammars maybe the easiest fix would be to alias the (interface_declaration)body field's node to some other name besides object_type (eg interface_declaration_body)?
Hi, I just ran into the fact that
(interface_declaration)
'sbody
is an(object_type)
Basically it seems unexpected/inconvenient that then there's no (easy) way to target just "object type literals" eg in a tree-sitter query (since if you do a query for
(object_type)
it will also capture the{...}
part of interface declarations, which conceptually seems like a very different thing than an object type literal)So from my limited understanding of tree-sitter grammars maybe the easiest fix would be to alias the
(interface_declaration)
body
field's node to some other name besidesobject_type
(eginterface_declaration_body
)?