ts_query_ls/docs/negation.md
Riley Bruins 354dc41b43
feat(hover): coverage for negated fields (#131)
Also adds some more tests and refactoring to the hover code
2025-05-19 13:52:48 -07:00

354 B

Negated Fields

You can also constrain a pattern so that it only matches nodes that lack a certain field. To do this, add a field name prefixed by a ! within the parent pattern. For example, this pattern would match a class declaration with no type parameters:

(class_declaration
  name: (identifier) @class_name
  !type_parameters)