Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Varargs with EmmyLua doc #116

Closed
MinusKube opened this issue Mar 6, 2018 · 1 comment
Closed

Varargs with EmmyLua doc #116

MinusKube opened this issue Mar 6, 2018 · 1 comment

Comments

@MinusKube
Copy link

MinusKube commented Mar 6, 2018

Is it possible to use varargs inside the @param with the EmmyLua doc?
I tried to do

---@param ... number[]
function method(...)
  local test = select(1, ...)
end

and

---@param ... number...
function method(...)
  local test = select(1, ...)
end

But none works correctly, and the test variable is never recognized as a number.

@tangzx
Copy link
Member

tangzx commented Oct 29, 2018

add new annotation: @vararg
usage:

---@vararg number
local function method(...)
    local test = select(1, ...)
end

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

No branches or pull requests

2 participants