[Refactor] Turn @readonly
JS Doc into getters
#10263
Labels
0 - new
New issues that need assignment.
calcite-components
Issues specific to the @esri/calcite-components package.
needs milestone
Planning workflow - pending milestone assignment, has priority and/or estimate.
refactor
Issues tied to code that needs to be significantly reworked.
Description
Blocked by #10310
Calcite components have ~22 readonly properties.
Those are currently denoted using the
@readonly
JS Doc tag:calcite-design-system/packages/calcite-components/src/components/table/table.tsx
Line 131 in 34a80ac
This shows the property as readonly in the docs and the typings, but not at runtime.
In Lumina (formerly ArcGIS Lit) readonly can be enforced at runtime
Lumina readonly properties
See also this comment from Matt: https://devtopia.esri.com/WebGIS/arcgis-web-components/issues/1463#issuecomment-4996968
Thus, after running the codemod, you should manually refactor the readonly property to getters OR add
readOnly:true
parameter to@property()
decorator.Proposed Advantages
The read only properties will be enforced for non-TypeScript users and HTML-only users
Which Component
22 properties across several components
Relevant Info
No response
Calcite package
The text was updated successfully, but these errors were encountered: