You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---@returnboolean, string ok result commentlocalfunctionparse(input)
localok=truelocalresult="foo"returnok, resultend---@returnboolean, string ok, result commentlocalfunctionparse2(input)
localok=truelocalresult="foo"returnok, resultend
Activity
carsakiller commentedon Mar 10, 2026
You should use a
@returnper return value:ChillerDragon commentedon Mar 11, 2026
Oh I somehow thought that was for function overloading. Where it could return either one or the other.
Will look into it 👀
ChillerDragon commentedon Mar 11, 2026
Maybe I'll send a pr to the wiki with one more example for that. Because I feel like it's missing in the return section.
Better way to annotate multiple return values
add: multiple return values example
add: multiple return values example (LuaLS#109)