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

Support nullable = false for properties #1625

Open
pbor opened this issue Dec 19, 2024 · 1 comment
Open

Support nullable = false for properties #1625

pbor opened this issue Dec 19, 2024 · 1 comment

Comments

@pbor
Copy link
Contributor

pbor commented Dec 19, 2024

If an object has a string property, getters always return Option<String>. If the property is always set by construction, it would be great to be able to tell gir that it is not nullable, eg:

    [[object.property]]
    name = "my-prop"
    nullable = false
@sdroege
Copy link
Member

sdroege commented Dec 30, 2024

@pbor Do you want to give that a try? That should be relatively straightforward to add as a) we already read the nullable annotation for properties, b) we have nullable configuration for other things. That should be possible to handle basically the same way

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