wc-storybook-helpers icon indicating copy to clipboard operation
wc-storybook-helpers copied to clipboard

Emitted event type always shown as `CustomEvent`

Open peschee opened this issue 1 year ago • 1 comments

I have this piece in my CEM:

          "events": [
            {
              "name": "focus",
              "type": {
                "text": "Event"
              },
              "description": "Emitted when the element has received focus."
            },

The argTypes returned by the helper show CustomEvent<Event> though:

{
    "name": "focus",
    "description": "Emitted when the element has received focus.",
    "control": false,
    "table": {
        "category": "events",
        "type": {
            "summary": "CustomEvent<Event>"
        }
    }
}

peschee avatar Sep 03 '24 12:09 peschee

This has been added to the latest version of the project: https://wc-toolkit.com/integrations/storybook/

break-stuff avatar Mar 04 '25 22:03 break-stuff