-
Notifications
You must be signed in to change notification settings - Fork 60
Description
Checklist
- Did you run the analyzer with the
--devflag to get more information? - Did you create a minimal reproduction in the playground?
Non-primitive prop types (object, dates, etc...) should NOT be added to the attributes list in custom element manifest.
In this example we can see that object/date props are added as attributes:
This is strange because this behavior is documented here with a comment https://github.com/open-wc/custom-elements-manifest/blob/master/packages/analyzer/src/features/framework-plugins/stencil/stencil.js#L57 but this is not implemented like this. In the past this behavior was right 1d4c7b1#diff-4052a5b77a3c558016f33f9b0ff894ea7c3337023d3132e32de0536c6a1ca753L69 but I got replaced for some reasons :/
In my case, this causes an issues with https://github.com/wc-toolkit/storybook-helpers because object prop cannot be an attribute, preventing the correct control type in Storybook (https://github.com/wc-toolkit/storybook-helpers/blob/main/src/cem-parser.ts#L385).
Expected behavior
Non-primitive props should be added to attributes list, only in members