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

@@ -9,6 +9,7 @@ local M = {}
TreeExplorer = nil
local first_init_done = false
---@param foldername string
function M.init(foldername)
local profile = log.profile_start("core init %s", foldername)
@@ -23,14 +24,17 @@ function M.init(foldername)
log.profile_end(profile)
end
---@return table
function M.get_explorer()
return TreeExplorer
end
---@return string
function M.get_cwd()
return TreeExplorer.absolute_path
end
---@return integer
function M.get_nodes_starting_line()
local offset = 1
if view.is_root_folder_visible(M.get_cwd()) then