fix: type annotations and type errors

This commit is contained in:
Steven Arcangeli 2023-08-12 20:32:52 -07:00
parent 0ccf95ae5d
commit 47c7737618
16 changed files with 83 additions and 22 deletions

View file

@ -476,6 +476,7 @@ M.format_entry_cols = function(entry, column_defs, col_width, adapter)
for i, column in ipairs(column_defs) do
local chunk = columns.render_col(adapter, column, entry)
local text = type(chunk) == "table" and chunk[1] or chunk
---@cast text string
col_width[i + 1] = math.max(col_width[i + 1], vim.api.nvim_strwidth(text))
table.insert(cols, chunk)
end