Skip to content

Animation directive on Components give unhelpful error #8639

@ngtr6788

Description

@ngtr6788

Describe the bug

Invalid directives applied on components, like style: or transition: , give helpful errors, like Transitions can only be applied to DOM elements, not components. However, animate: directions on directives give a rather unhelpful errors like Not implemented: Animation.

It'd be great if we have a better error, like Animations can only be applied to DOM elements, not components.

Reproduction

https://svelte.dev/repl/817ea6490c9e4ad7a42a2ed6a9c9bec0?version=3.59.1

Alternatives

Maybe consider defining what "animation" means in the context of components?

Logs

No response

System Info

n/a

Severity

annoyance

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