lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


In VS Code (with sumneko Lua extension), if you generate a small "help
info" for your function foo, then you can write "---@nodiscard"
before. In this case VS Code will warn you, if you invoke foo like
this... :

---@nodiscard
function foo() end

... otherwise you have to do more effort, e. g. presenting a version
like "foostart, foocheckfinished", or doing it in a multiple task /
coroutine system, where you do not really wait, but allow the CPU to
do further work while waiting.