Skip to content

Add async functions to the $effect parameter typeΒ #10498

@Thiagolino8

Description

@Thiagolino8

Describe the problem

The onMount function typing allows the reception of an asynchronous function as long as this function does not return a cleanup
The typing of the $effect rune does not allow the same, even though it is much more useful for it than for onMount and even though $effect is being marketed as an alternative to onMount

Describe the proposed solution

Change the typing to, just like onMount, allow asynchronous function as a callback as long as this callback does not return a cleanup

Importance

nice to have

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