custom-elements-manifest icon indicating copy to clipboard operation
custom-elements-manifest copied to clipboard

Found playground issue - "@ignore" not working with Lit @property

Open awmack opened this issue 1 year ago • 0 comments

Playground issue

Reproduction URL: https://custom-elements-manifest.netlify.app/?source=CmltcG9ydCB7IExpdEVsZW1lbnQsIHByb3BlcnR5IH0gZnJvbSAnbGl0LWVsZW1lbnQnOwoKZXhwb3J0IGNsYXNzIE15RWxlbWVudCBleHRlbmRzIExpdEVsZW1lbnQgewogIC8qKiAKICAgKiBUaGlzIGlzIG15IGZvbyBwcm9wZXJ0eS4KICAgKiBAaWdub3JlCiAgICovCiAgQHByb3BlcnR5KCkKICBmb28gPSAnYmFyJzsKfQo%3D&library=litelement

Additional information:

I encountered this issue when working on a component with the current version of Lit (v2), though I was able to reproduce it in the playground with Lit (v1) as well. CEM analyzer crashes when I include @ignore in the JSDoc for a public property/attribute.

It's interesting that this seems to hinge on whether the property is an attribute:

Error:

/** @ignore */
@property({attribute: true})
foo = 'bar';

Not an error:

/** @ignore */
@property({attribute: false})
foo = 'bar';

awmack avatar Nov 01 '22 20:11 awmack