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

Exclude symbols when checking binding types #364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SegaraRai
Copy link

@SegaraRai SegaraRai commented Jul 27, 2024

This PR excludes ES symbol types from unions when checking bindings.
This ensures that nothing and noChange are ignored in type checking.

We remove all symbol types because it is not possible to get the details of symbol types.
This will produce false negatives when other symbols are mixed in, but I consider such situations to be rare.

Closes #207. Closes #251. Closes #316.

This PR does not resolve the issue of ifDefined not supporting null (even though Lit v3 does).
It will probably be resolved when we stop treating ifDefined specially, or when #296 is merged.
The user can use either a custom directive or value ?? nothing instead of ifDefined to workaround the issue.

@stefanpearson
Copy link

Is there any update on merging this? It would be great to have this merged and published, and I'm surprised it hasn't been resolved already!

Binding nothing to an attribute is a common thing that the Lit docs recommends when it needs to be omitted, yet my IDE is riddled with red squiggly lines everywhere complaining about it.

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