-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add readonly flag to properties #34
Closed
Comments
This could be even useful with CSS props. |
I have a map component and 2 marker components that expose 3 readonly properties, I used to annotate them like this: /** @readonly */
this.size = [16, 16];
/** @readonly */
this.anchor = [8, 8];
/** @readonly */
this.tooltip = [0, 0]; |
I decided to move those to getters (without setters) and I'll create a CEM analyzer plugin that used this "getter but no setter" to identify fields as readonly. |
bennypowers
added a commit
to bennypowers/custom-elements-manifest
that referenced
this issue
Dec 21, 2021
This was referenced Dec 21, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be helpful to mark a class field or property as readonly (i.e. getter only or defined as writable: false)
The text was updated successfully, but these errors were encountered: