chore: types

mostly types anyway.
This commit is contained in:
Linden
2023-07-31 16:29:27 +10:00
parent f11668b95c
commit 9d98b9aada
6 changed files with 59 additions and 51 deletions

View File

@@ -49,6 +49,7 @@ end
---@param data KeybindProps
---@return CKeybind
function lib.addKeybind(data)
---@cast data CKeybind
if not data.defaultKey then data.defaultKey = '' end
if not data.defaultMapper then data.defaultMapper = 'keyboard' end
@@ -74,7 +75,7 @@ function lib.addKeybind(data)
data.disable = disableKeybind
keybinds[data.name] = setmetatable(data, keybind_mt)
return data --[[@as CKeybind]]
return data
end
return lib.addKeybind

View File

@@ -123,6 +123,7 @@ function table.freeze(tbl)
__metatable = 'readonly',
__newindex = frozenNewIndex,
__len = function() return #copy end,
---@diagnostic disable-next-line: redundant-return-value
__pairs = function() return next, copy end,
})