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

Treat noChange and nothing as any type in binding #251

Open
rictic opened this issue Apr 25, 2022 · 1 comment · May be fixed by #364
Open

Treat noChange and nothing as any type in binding #251

rictic opened this issue Apr 25, 2022 · 1 comment · May be fixed by #364

Comments

@rictic
Copy link
Collaborator

rictic commented Apr 25, 2022

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

@WickyNilliams
Copy link

related #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>
`

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

Successfully merging a pull request may close this issue.

2 participants