lit-analyzer
lit-analyzer copied to clipboard
Treat noChange and nothing as any type in binding
The noChange and nothing values have special meaning in a lit binding, and they are legal to use everywhere, as they directly specify behavior rather than an ordinary value to be set/rendered
related https://github.com/runem/lit-analyzer/issues/207
outside of custom directives, you can also trigger analyzer errors using built-ins like the when directive:
html`
<button
tabindex=${when(someCondition, () => "-1", () => nothing)}
></button>
`