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

Properties that take in GTypes should also be able to take in a GObject.Object #192

Open
vixalien opened this issue Aug 20, 2024 · 0 comments

Comments

@vixalien
Copy link

Given the following scenario:

const data_model = new Gio.ListStore({ item_type: Book });

/*
Property '__type__' is missing in type 'typeof Book' but required in type 'GType<unknown>'.ts(2741)
gobject-2.0.d.ts(23, 13): '__type__' is declared here.
gio-2.0.d.ts(33512, 17): The expected type comes from property 'item_type' which is declared here on type 'Partial<ConstructorProps<Object>>'
*/

I think it should be safe that parameters that accept GTypes should also take in GObjects as GJS will automatically get the Object's gtype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant