-
Couldn't load subscription status.
- Fork 47
Open
Description
I've been trying to write a function that accepts a number of Wrapped<T>'s and returns T's, but couldn't get it to work.
---@class Wrapper<T>
---@generic T
---@param ... Wrapper<T>...
---@return T...
function unwrap(...) end
---@type Wrapper<int>, Wrapper<string>
local a, b
--should be int, string
local b, c = unwrap(a, b)Instead a warning is thrown: expected 0 parameters but found 2 [redundant-parameter].
Can something like this be done with current variadics implementation?
Metadata
Metadata
Assignees
Labels
No labels