Skip to content

Svelte 5: +layout.svelte children not included in zero-effort type safety #2212

@eddiemcconkie

Description

@eddiemcconkie

Describe the bug

The $props for +layout.svelte files should include children, alongside data and form for zero-effort types. You can manually type children as Snippet, but then you have to manually type data and form as well.

Reproduction

<!-- /routes/+layout.svelte -->
<script lang="ts">
  const { children } = $props();
</script>

{@render children()}
<!-- /routes/+page.svelte -->
<h1>Page content</h1>

Expected behaviour

children is included in $props for +layout.svelte files

System Info

  • OS: MacOS
  • IDE: VS Code

Which package is the issue about?

No response

Additional Information, eg. Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions