File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 11local git = require (" nvim-tree.git" )
22
3- --- TODO remove all @cast, @as
3+ --- TODO remove all @cast
44--- TODO remove all references to directory fields:
5- ---- --@field has_children boolean
6- ---- --@field group_next Node? -- If node is grouped, this points to the next child dir/link node
7- ---- --@field nodes Node[]
8- ---- --@field open boolean
9- ---- --@field hidden_stats table? -- Each field of this table is a key for source and value for count
105
116--- Abstract Node class.
127--- Uses the abstract factory pattern to instantiate child instances.
111106-- If node is grouped, return the last node in the group. Otherwise, return the given node.
112107--- @return Node
113108function BaseNode :last_group_node ()
114- local node = self --[[ @as BaseNode]]
109+ local node = self
110+ --- @cast node BaseNode
115111
116112 while node .group_next do
117113 node = node .group_next
@@ -239,7 +235,6 @@ function BaseNode:expand_or_collapse(toggle_group)
239235 end
240236
241237 local head_node = self :get_parent_of_group ()
242- --- @cast head_node DirectoryNode -- TODO move this to the class
243238 if toggle_group then
244239 head_node :toggle_group_folders ()
245240 end
You can’t perform that action at this time.
0 commit comments