Minor annotation on the Object class
This commit is contained in:
@@ -15,13 +15,18 @@
|
||||
-- You should have received a copy of the GNU General Public License along with
|
||||
-- Omicron Frames. If not, see <https://www.gnu.org/licenses/>.
|
||||
local omi = select(2, ...)
|
||||
|
||||
---@class Object
|
||||
local Object = omi.GetModule("types").Object
|
||||
local IsDerivedFrom = omi.GetModule("types").IsDerivedFrom
|
||||
|
||||
-- Create a new instance of Object or (more likely) any inheriting class
|
||||
function Object.new(class, ...)
|
||||
---@generic T : Object
|
||||
-- @param cls T
|
||||
-- @return T
|
||||
function Object.new(cls, ...)
|
||||
local o = {}
|
||||
setmetatable(o, class)
|
||||
setmetatable(o, cls)
|
||||
|
||||
if o.Init ~= nil then
|
||||
o:Init(...)
|
||||
|
Reference in New Issue
Block a user