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

flags should be GObject.ParamFlags in GObject.ParamSpec.object() #181

Open
spazziale opened this issue Jul 21, 2024 · 9 comments
Open

flags should be GObject.ParamFlags in GObject.ParamSpec.object() #181

spazziale opened this issue Jul 21, 2024 · 9 comments

Comments

@spazziale
Copy link

Using @girs/gobject-2.0: "^2.80.2-4.0.0-beta.9",

now the only type accepted is "string"

@JumpLink
Copy link
Collaborator

@spazziale sorry, my mistake. I hope this has been fixed. I release beta.10 now, can you test if it works again?

@JumpLink JumpLink reopened this Jul 21, 2024
@spazziale
Copy link
Author

seems to not be solved, maybe because i used

import GLib from '@girs/glib-2.0';
import GObject from '@girs/gobject-2.0';

due to #182

@JumpLink
Copy link
Collaborator

@spazziale are you generating the types by yourself or do you use the types published on npm? If you generates the types by yourself then there is now a bracking change: package.json support is now disabled by default. But you can enable it again with --packlage.

@JumpLink
Copy link
Collaborator

@spazziale Maybe you are simply missing a

import '@girs/gjs';
import '@girs/gjs/dom';

?

@spazziale
Copy link
Author

@spazziale are you generating the types by yourself or do you use the types published on npm? If you generates the types by yourself then there is now a bracking change: package.json support is now disabled by default. But you can enable it again with --packlage.

no i'm using the ones from npm

@spazziale
Copy link
Author

import '@girs/gjs';
import '@girs/gjs/dom';

nothing happen,
here is my tsconfig.json that was working with beta.5

@JumpLink
Copy link
Collaborator

Can you try "moduleResolution": "NodeNext"?

@spazziale
Copy link
Author

spazziale commented Jul 21, 2024

Can you try "moduleResolution": "NodeNext"?

using beta.11
import now works, should it be documented somewhere or it's something about my config ( still new to js/ts, sorry)?
sadly the original error is still not fixed.

also i noticed that GObject constructor() doesn't take in input constructProperties

constructor(constructProperties = {}) {
        super(constructProperties); // Expected 0 arguments, but got 1.
    }

thanks for your work

@spazziale spazziale reopened this Jul 21, 2024
@JumpLink
Copy link
Collaborator

yes, we should document it. I think it's because we use ESM + Node.js for package resolution and that's what NodeNext is for. “moduleResolution”: “bundler” should also work, but then a bundler like esbuild is needed as we do this in the examples.

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

2 participants