chore: add type annotations to (almost) all functions

This commit is contained in:
Akmadan23
2023-11-24 12:01:24 +01:00
parent 46e1f776f0
commit fabea3376e
48 changed files with 438 additions and 83 deletions

View File

@@ -8,6 +8,9 @@ local Iterator = require "nvim-tree.iterators.node-iterator"
local M = {}
---@param node Node
---@param projects table
---@param unloaded_bufnr number|nil
local function refresh_nodes(node, projects, unloaded_bufnr)
Iterator.builder({ node })
:applier(function(n)
@@ -22,6 +25,8 @@ local function refresh_nodes(node, projects, unloaded_bufnr)
:iterate()
end
---@param parent_node table
---@param projects table
function M.reload_node_status(parent_node, projects)
local toplevel = git.get_toplevel(parent_node.absolute_path)
local status = projects[toplevel] or {}