File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 173173-- If node is grouped, return the last node in the group. Otherwise, return the given node.
174174--- @return Node
175175function BaseNode :last_group_node ()
176- local node = self
176+ local node = self --[[ @as BaseNode ]]
177177
178178 while node .group_next do
179179 node = node .group_next
@@ -269,6 +269,7 @@ function BaseNode:group_empty_folders()
269269 local is_root = not self .parent
270270 local child_folder_only = self :has_one_child_folder () and self .nodes [1 ]
271271 if self .explorer .opts .renderer .group_empty and not is_root and child_folder_only then
272+ --- @cast self DirectoryNode -- TODO move this to the class
272273 self .group_next = child_folder_only
273274 local ns = child_folder_only :group_empty_folders ()
274275 self .nodes = ns or {}
291292function BaseNode :expand_or_collapse (toggle_group )
292293 toggle_group = toggle_group or false
293294 if self .has_children then
295+ --- @cast self DirectoryNode -- TODO move this to the class
294296 self .has_children = false
295297 end
296298
You can’t perform that action at this time.
0 commit comments