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:
parent
70e623fcce
commit
e570bf3980
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue