[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: recognizing whether a caller uses function result
- From: bil til <biltil52@...>
- Date: Wed, 22 Feb 2023 06:29:45 +0100
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.