Skip to content

... parameter annotation #939

Answered by lua-rocks
ayhon asked this question in Q&A

You must be logged in to vote

Don't you read the documentation? "..." is called vararg:

@vararg

Indicates a function has multiple variable arguments.

---@vararg string
---@return string
function strconcat(...) end

For returning a vararg you can use ... as a type.

---@vararg string
---@return ...
function tostringall(...) end

Replies: 1 comment

You must be logged in to vote
0 replies
Answer selected by ayhon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants