-
-
Notifications
You must be signed in to change notification settings - Fork 369
Closed
Labels
feat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)Related to Lua Language Server Annotations (LuaCats)questionUser has a questionUser has a question
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?
RomanSpector
Metadata
Metadata
Assignees
Labels
feat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)Related to Lua Language Server Annotations (LuaCats)questionUser has a questionUser has a question