fix: resolve pre-existing LuaLS typecheck warnings
Problem: CI typecheck fails with 13 warnings — 11 need-check-nil in
util.render_text (opts param annotated nil|table but guaranteed non-nil
after tbl_deep_extend), 1 undefined-doc-param in view.render_buffer_async
(annotation says "callback" but param is "caller_callback"), and 1
need-check-nil on opts in the same function.
Solution: add ---@cast opts -nil after the tbl_deep_extend call, fix
the param name in the doc annotation, and add opts = opts or {} guard.
This commit is contained in:
parent
209d631cb9
commit
642f745038
2 changed files with 3 additions and 1 deletions
|
|
@ -582,6 +582,7 @@ M.render_text = function(bufnr, text, opts)
|
|||
h_align = "center",
|
||||
v_align = "center",
|
||||
})
|
||||
---@cast opts -nil
|
||||
if not vim.api.nvim_buf_is_valid(bufnr) then
|
||||
return
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue