Skip to content

el param type in Transition hooksΒ #10935

@sherif414

Description

@sherif414

after the new update - 1.6.1 - i'm getting this error on transition hooks

async function AnimateLeave(el: HTMLElement, done: () => void) {
...
}

<Transition @enter="AnimateEnter>

Type '(el: HTMLElement, done: () => void) => Promise<void>' is not assignable to type '(el: Element, done: () => void) => void'.
this is kinda inconvenient since almost always expect el to be of type htmlElement and not the generic ELement so you can get access to properties like el.style and el.classList

previously it didn't give type hints at all

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions