[language-typescript] Several fixes…

* Ensure private methods like `#foo` are included in lists of symbols.
* Scope `void` as a unary operator.
* Properly scope rest object properties in function definitions.
This commit is contained in:
Andrew Dupont 2024-06-13 14:11:00 -07:00
parent ef26c588a3
commit b4cba9b54d
2 changed files with 8 additions and 3 deletions

View File

@ -71,6 +71,11 @@
(shorthand_property_identifier_pattern) @variable.parameter.destructuring._LANG_)
(#set! capture.final))
(required_parameter
pattern: (object_pattern
(rest_pattern (identifier) @variable.parameter.destructuring.rest._LANG_))
(#set! capture.final))
(required_parameter
pattern: (object_pattern
(object_assignment_pattern
@ -860,7 +865,7 @@
(binary_expression
["/" "+" "-" "*" "**" "%"] @keyword.operator.arithmetic._LANG_)
(unary_expression ["+" "-"] @keyword.operator.unary._LANG_)
(unary_expression ["+" "-" "void"] @keyword.operator.unary._LANG_)
(binary_expression
[

View File

@ -7,11 +7,11 @@
(#set! symbol.tag "function")) @definition.function
(method_definition
name: (property_identifier) @name
name: [(property_identifier) (private_property_identifier)] @name
(#set! symbol.tag "method")) @definition.method
(abstract_method_signature
name: (property_identifier) @name
name: [(property_identifier) (private_property_identifier)] @name
(#set! symbol.tag "method")) @definition.method
(class_declaration