fix(diff): cast tonumber result to integer

Problem: LuaLS infers priority as integer from the = 0 initialiser
but tonumber returns number?, causing a cast-local-type diagnostic.

Solution: inline --[[@as integer]] cast after the tonumber call.
This commit is contained in:
Barrett Ruth 2026-02-24 22:31:37 -05:00 committed by Barrett Ruth
parent 8f9052bad1
commit 437944d441

View file

@ -37,7 +37,7 @@ function M.parse_buffer(lines)
local prio_str = stripped:match('^%[(%d+)%] ') local prio_str = stripped:match('^%[(%d+)%] ')
local priority = 0 local priority = 0
if prio_str then if prio_str then
priority = tonumber(prio_str) priority = tonumber(prio_str) --[[@as integer]]
stripped = stripped:sub(#prio_str + 4) stripped = stripped:sub(#prio_str + 4)
end end
local description, metadata = parse.body(stripped) local description, metadata = parse.body(stripped)