mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 23:16:03 +01:00
chore: types
mostly types anyway.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user