The source project of this merge request has been removed.
Add Gio.promise helper
I have this helper in basically every app or piece of GJS code that I write. I'm aware of Gio._promisify
but it's private, undocumented, and I don't think it is meant for end users. The goal of Gio.promise
is to offer an alternative that end users can use immediately and that we can use in examples and documentation.
I count 22 examples of async methods being wrapped in new Promise
on gjs.guide
I would also like to use this to simplify Library examples in Workbench.
I'm not super happy with the name Gio.promise
- happy to hear suggestions but I think we should keep it simple and short.