mirror of
https://github.com/ribru17/ts_query_ls.git
synced 2025-12-23 05:36:52 +00:00
354 B
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)