Skip to content

doc: add a note on typing Snippets in $props #15691

Open
@Lofty-Brambles

Description

@Lofty-Brambles

Describe the problem

When trying to type $props, a common requirement tends to be providing a type to children. To a complete svelte newbie, it might be helpful to let them know that it is a snippet. Would it be pertinent to have a note linking to the typing snippets section inside the documentation for $props for that? Somewhere around/below the type safety section?

Describe the proposed solution

Something along the lines of:

[!NOTE] It is quite common to provide a type for children. children is typed as a Snippet, an section on providing types for Snippets is provided here.

Importance

nice to have

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