You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nvim-libmodal/lua/libmodal/src/utils/classes.lua

19 lines
331 B
Lua

--- @class libmodal.utils.classes
local classes =
{
--- define a metatable.
--- @param template? table the default value
--- @return table class
new = function(template)
-- set self to `template`, or `{}` if nil.
local self = template or {}
-- set `__index`.
self.__index = self
return self
end,
}
return classes