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

Boolean type based on existence #232

Open
hellcp opened this issue May 2, 2024 · 1 comment
Open

Boolean type based on existence #232

hellcp opened this issue May 2, 2024 · 1 comment
Assignees
Labels

Comments

@hellcp
Copy link

hellcp commented May 2, 2024

Some APIs define the true/false state based on existence of the node.

So for example:

<root>
  <option/>
</root>

would evaluate option to be true
while:

<root>
</root>

would evaluate option to be false (or nil, in any case falsy).

This can't be done with the current Boolean type, and implementing it on top would break the compatibility, so it would need to be a new type.

@mvz
Copy link
Owner

mvz commented May 2, 2024

Thanks for reporting this @hellcp, I'll see how this can be accommodated.

@mvz mvz self-assigned this May 2, 2024
@mvz mvz added the feature label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants