From e570bf39807b3ded08f3ac513f62b53a3402c7fa Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Thu, 5 Mar 2026 11:13:12 -0500 Subject: [PATCH] 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` but stores `false` as a sentinel for files that failed to open. Solution: widen the annotation to `table`. --- lua/diffs/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/diffs/init.lua b/lua/diffs/init.lua index f525c25..2fb5437 100644 --- a/lua/diffs/init.lua +++ b/lua/diffs/init.lua @@ -315,7 +315,7 @@ end ---@param hunks diffs.Hunk[] ---@param max_lines integer local function compute_hunk_context(hunks, max_lines) - ---@type table + ---@type table local file_cache = {} for _, hunk in ipairs(hunks) do