chore: add type annotations to (almost) all functions
This commit is contained in:
@@ -6,6 +6,9 @@ local explorer_node = require "nvim-tree.explorer.node"
|
||||
|
||||
local M = {}
|
||||
|
||||
---@param where string
|
||||
---@param what string
|
||||
---@return fun()
|
||||
function M.fn(where, what)
|
||||
return function()
|
||||
local node_cur = lib.get_node_at_cursor()
|
||||
|
||||
@@ -6,6 +6,8 @@ local lib = require "nvim-tree.lib"
|
||||
|
||||
local M = {}
|
||||
|
||||
---@param should_close boolean|nil
|
||||
---@return fun(node: Node): boolean|nil
|
||||
function M.fn(should_close)
|
||||
should_close = should_close or false
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ local Iterator = require "nvim-tree.iterators.node-iterator"
|
||||
|
||||
local M = {}
|
||||
|
||||
---@param direction string
|
||||
---@return fun(node: Node): nil
|
||||
function M.fn(direction)
|
||||
return function(node)
|
||||
if node.name == ".." or not direction then
|
||||
|
||||
Reference in New Issue
Block a user