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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @sumneko@artemking4

        Issue actions