Skip to content

How to do multiple named return values? #3374

Description

@ChillerDragon

https://luals.github.io/wiki/annotations/#return

I tried this

---@return boolean, string ok result comment
local function parse(input)
	local ok = true
	local result = "foo"
	return ok, result
end

---@return boolean, string ok, result comment
local function parse2(input)
	local ok = true
	local result = "foo"
	return ok, result
end
Image

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

    feat/LuaCats AnnotationsRelated to Lua Language Server Annotations (LuaCats)questionUser has a question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions