-
Notifications
You must be signed in to change notification settings - Fork 65
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
Using LitElement styles
is considered as a property
#213
Comments
I've found out that declaring the styles property thought a getter solve my issue. Example:
...
@customElement('my-element')
export class MyElement extends LitElement {
static get styles() {
return css`
:host {
display: block;
}
`;
}
... |
The same for defining I had to change from class PatientList extends LitElement {
static properties = {
patients: { type: Array, attribute: false },
}
} to class PatientList extends LitElement {
static get properties() {
return {
patients: { type: Array, attribute: false },
}
}
} |
Is using a getter() a work-around, or is it there a way to exclude specific properties that are known to not be in the API? |
I'm also staggering with this. Do we really need to convert styles to a getter just for hiding it from web components definition? |
Persists on 2.0.0-next.4. A workaround would be to implement a new |
I am working on a POC on my own and it seems like
web-component-analyzer
is consideringstatic styles
as a component property.Example:
my-element.ts
custom-elements.json
I am using
web-component-analyzer
1.1.6 .The text was updated successfully, but these errors were encountered: