gjsify/ts-for-gir

Incorrect types for `Gio.BindingTransformFunc`

Opened this issue · 0 comments

That function type is used in GObject.Object.bind_property_full.

The current type says that the transform function expects 3 args, while in reality it returns 2, because the 3rd one is a return parameter.

Current version:

export type BindingTransformFunc = (binding: Binding, from_value: Value | any, to_value: Value | any) => boolean;

Correct version:

export type BindingTransformFunc = (binding: Binding, from_value: Value | any) => [boolean, to_value: Value | any];