bytepath/def/Object.d.lua

29 lines
674 B
Lua

---@meta
---@module 'classic'
---@class Object
---@field super Object|nil # Parent class methods (for inheritance)
local Object = {}
---Create a new instance of the class.
---@return self
function Object:new(...) end
---Call the super-class constructor.
---@param self Object
function Object.super.new(self, ...) end
---Create a subclass.
---@return Object # the new subclass (its metatable is set up)
function Object:extend() end
---Mix-in a table of methods into the class.
---@param mixin table
function Object:implement(mixin) end
---Checks if object is of a specific type
---@param object Object
---@return boolean
function Object:is(object) end
return Object