Skip to content

Commit 5dbe0f4

Browse files
committed
fix: typing
1 parent 2f71334 commit 5dbe0f4

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

lua/gitsigns/actions/blame.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ local function update_right_extmarks(blm_bufnr, blm_win, entries, min_time, max_
345345
local extmarks = api.nvim_buf_get_extmarks(blm_bufnr, ns, 0, -1, { details = true })
346346

347347
for _, ext in ipairs(extmarks) do
348-
local id, row, col, details = ext[1], ext[2], ext[3], ext[4]
348+
local id, _row, _col, details = ext[1], ext[2], ext[3], assert(ext[4])
349349
if details.virt_text_win_col then
350350
api.nvim_buf_del_extmark(blm_bufnr, ns, id)
351351
end

lua/gitsigns/actions/nav.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ local function findword(x, word)
3737
return string.find(x, '%f[%w_]' .. word .. '%f[^%w_]') ~= nil
3838
end
3939

40-
--- @param opts? Gitsigns.NavOpts
40+
--- @param opts? Partial<Gitsigns.NavOpts>
4141
--- @return Gitsigns.NavOpts
4242
local function process_nav_opts(opts)
4343
opts = opts or {}
@@ -68,7 +68,7 @@ local function process_nav_opts(opts)
6868
opts.target = 'unstaged'
6969
end
7070

71-
return opts
71+
return opts --[[@as Gitsigns.NavOpts]]
7272
end
7373

7474
--- @async

lua/gitsigns/cache.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ function M.new(bufnr, file, git_obj)
7777
}, { __index = CacheEntry })
7878
end
7979

80+
--- @param duration integer
81+
--- @param cb fun()
8082
local sleep = async.wrap(2, function(duration, cb)
8183
vim.defer_fn(cb, duration)
8284
end)

lua/gitsigns/system/compat.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function SystemObj:is_closing()
9898
return handle == nil or handle:is_closing() or false
9999
end
100100

101-
--- @param output? fun(err: string?, data: string?)|false
101+
--- @param output? fun(err: string?, data: string?)|boolean
102102
--- @param text? boolean
103103
--- @return uv.uv_stream_t? pipe
104104
--- @return fun(err: string?, data: string?)? handler

0 commit comments

Comments
 (0)