Resource without parameter does not work?

According to that doc:

Resources without parameters

It is also possible to define resources that does not require any input nor generates any output. They are just like callbacks that can be executed as you want, for example to reboot the device, or do some required action.

In this case, the resource is defined as a function without any input or output parameters.

thing[“runsometing”] = {
// write here your execution code

This sounds good, but the resource runsomething cannot be defined as a widget. (or I am too dumb to understand how).

Can someone advise?

I second this requests.
I see that it’s available in the mobile app and in the device API, but cannot be associated with any widget.