Closed
Description
Hi, I'm working on a project where we're using a function to construct classes which allow you to pass in an inheriting class. This function to construct a class looks something like this:
---@generic TBase: table
---@generic T: TBase
---@param baseClass TBase
---@return T
function Class(baseClass, class)
end
basically the class extends the base class, however I'm not sure how to do this with generics. You can see my attempt above with ---@generic T: TBase
but that doesn't work.
Is this something that's currently possible or not?