refactor: fix luals warnings

This commit is contained in:
dundargoc
2023-12-13 14:04:24 +01:00
committed by dundargoc
parent bf0be0f63e
commit d51b615747
17 changed files with 133 additions and 77 deletions

View File

@@ -329,11 +329,11 @@ end
---@param fn (T) Function to run
---@return T
local function once(fn)
local value --- @type any
local value --- @type function
local ran = false
return function(...)
if not ran then
value = fn(...)
value = fn(...) --- @type function
ran = true
end
return value