Skip to content

Support variadic generics #2119

@artemking4

Description

@artemking4
---@class Test<T...> : { test: fun(): T... }

---@type Test<number, string>
local a

local b, c, d = a.test()

-- b is a number
-- c is a string
-- d is nil

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfeat/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