class MyElement extends HTMLElement {
static get observedAttributes() {
return [
/** some jsdoc */ // only description
"placeholder",
/**
* Disabled the component // description goes here, or after the type.
* @type {disabled}
* @type {disabled} - Disables the component // If this is present, override the description above
* @property disabled // adds a `"fieldName": "prop1"` to the attr in the output CE.json
*/
"disabled",
];
}
}
[x] make sure it works for static get observedAttributes() {}
[x] make sure it works for static observedAttributes = []
[x] make sure the @property related fieldName doesnt clash with the support for the @property jsdoc
[x] make sure it supports a @type jsdoc
[x] make sure a @type's description overwrites the 'top' description
[x] add example in docs
[x] Deal with jsdoc type imports ${import('./module.js').SomeEvent}. Get type SomeEvent, add reference to ./module.js
[x] merge or override with JSDoc declared above the class
Fixture:
static get observedAttributes() {}
static observedAttributes = []
@property
relatedfieldName
doesnt clash with the support for the@property
jsdoc@type
jsdoc@type
's description overwrites the 'top' description${import('./module.js').SomeEvent}
. Get typeSomeEvent
, add reference to./module.js