chore: add type annotations to (almost) all functions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user