lit-analyzer icon indicating copy to clipboard operation
lit-analyzer copied to clipboard

Exclude symbols when checking binding types

Open SegaraRai opened this issue 1 year ago • 1 comments

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.

SegaraRai avatar Jul 27 '24 09:07 SegaraRai

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.

stefanpearson avatar Oct 09 '24 09:10 stefanpearson