Skip to content

bug: "beforetoggle" and "toggle" events should have type ToggleEvent #6322

@zbianca

Description

@zbianca

Prerequisites

Stencil Version

4.35

Current Behavior

ToggleEvent handlers are typed as a generic Event.

Expected Behavior

ToggleEvent handlers are typed as a Toggle Event.

See more:

System Info

Steps to Reproduce

Currently event.oldState and event.newState properties are not available due to the usage of a generic Event. Casting the Event as a ToggleEvent is necessary.

Code Reproduction URL

https://github.com/nborelli/popover-pop-bug/blob/main/src/components/my-component/my-component.tsx

Additional Information

I found this Reproduction URL on the previous related issue #5963.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions