Skip to content

feature: support generics in function type format #1170

Description

@TheFireBlast

Currently, the only way to document generic functions is to use @generic. and it's not possible to use them in overloads or fields.

The following examples are invalid:

---@genericT---@paramarg1string---@paramarg2T---@returnT---@overloadfun(arg2: T) <- Undefined type or alias `T`.localfunctionfoo(arg1, arg2)
returnarg2orarg1end
---@classFoo---@fieldbarfun<T>(arg:T): T <- `(` expected.localFoo= {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)feat/genericRelated to generic emulation feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions