gjsify / ts-for-gir

TypeScript type definition generator for GObject introspection interfaces
https://gjsify.org/pages/projects
Apache License 2.0
227 stars 19 forks source link

Missing promisified overloads #171

Open JumpLink opened 2 months ago

JumpLink commented 2 months ago

@ewlsh Some promisified methods are missing, for example for Gio.read_async + Gio.read_finish or Gio.File.load_contents_async + Gio.File.load_contents_finish

ewlsh commented 2 months ago

I'm looking at what happened here, should have a fix in the next few weeks.

swsnr commented 2 months ago

I'm upgrading a GNOME extension to ts-for-gir 4.0.0 types, and noticed missing promisified overloads as well:

Is this the same issue, or should I rather open a new one?

JumpLink commented 2 months ago

@swsnr I think this will be the same problem, so it will be correct here.

@ewlsh In v3 I just checked if there are methods with the same prefix and ending with _async and the other with _finish, but that might not be so clean either, especially since there are some cases where this convention is not followed

JumpLink commented 1 month ago

@ewlsh could you explain a bit how this works with you new parser atm? Maybe a good start to get into your code base.

ewlsh commented 5 days ago

Sorry for the delay here, adding some context and potential fixes here: https://github.com/gjsify/ts-for-gir/pull/177