fix(types): allow false sentinel in file_cache type annotation

Problem: lua-language-server reported `cast-local-type` because
`file_cache` was annotated as `table<string, string[]>` but stores
`false` as a sentinel for files that failed to open.

Solution: widen the annotation to `table<string, string[]|false>`.
This commit is contained in:
Barrett Ruth 2026-03-05 11:13:12 -05:00
parent 70e623fcce
commit e570bf3980

View file

@ -315,7 +315,7 @@ end
---@param hunks diffs.Hunk[]
---@param max_lines integer
local function compute_hunk_context(hunks, max_lines)
---@type table<string, string[]>
---@type table<string, string[]|false>
local file_cache = {}
for _, hunk in ipairs(hunks) do