Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect types for Gio.BindingTransformFunc #154

Open
vixalien opened this issue Mar 13, 2024 · 0 comments
Open

Incorrect types for Gio.BindingTransformFunc #154

vixalien opened this issue Mar 13, 2024 · 0 comments
Labels
gjs-convention Marks issues for aligning with GJS coding standards and practices

Comments

@vixalien
Copy link

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];
@JumpLink JumpLink added the gjs-convention Marks issues for aligning with GJS coding standards and practices label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gjs-convention Marks issues for aligning with GJS coding standards and practices
Projects
None yet
Development

No branches or pull requests

2 participants