fix(lua): annotate that TSNode functions can return nil (#24621)

This commit is contained in:
Kyuuhachi 2023-08-09 19:06:42 +02:00 committed by GitHub
parent 977f9659a7
commit 68f12e7fcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,15 +14,15 @@
---@field extra fun(self: TSNode): boolean
---@field child_count fun(self: TSNode): integer
---@field named_child_count fun(self: TSNode): integer
---@field child fun(self: TSNode, integer): TSNode
---@field named_child fun(self: TSNode, integer): TSNode
---@field descendant_for_range fun(self: TSNode, integer, integer, integer, integer): TSNode
---@field named_descendant_for_range fun(self: TSNode, integer, integer, integer, integer): TSNode
---@field parent fun(self: TSNode): TSNode
---@field next_sibling fun(self: TSNode): TSNode
---@field prev_sibling fun(self: TSNode): TSNode
---@field next_named_sibling fun(self: TSNode): TSNode
---@field prev_named_sibling fun(self: TSNode): TSNode
---@field child fun(self: TSNode, integer): TSNode?
---@field named_child fun(self: TSNode, integer): TSNode?
---@field descendant_for_range fun(self: TSNode, integer, integer, integer, integer): TSNode?
---@field named_descendant_for_range fun(self: TSNode, integer, integer, integer, integer): TSNode?
---@field parent fun(self: TSNode): TSNode?
---@field next_sibling fun(self: TSNode): TSNode?
---@field prev_sibling fun(self: TSNode): TSNode?
---@field next_named_sibling fun(self: TSNode): TSNode?
---@field prev_named_sibling fun(self: TSNode): TSNode?
---@field named_children fun(self: TSNode): TSNode[]
---@field has_changes fun(self: TSNode): boolean
---@field equal fun(self: TSNode, other: TSNode): boolean