Skip to content

Type error: Expected 0 arguments, but got 1 on argument in children() #2511

@shinokada

Description

@shinokada

Describe the bug

Using VSCode with Svelte for VS Code and following the doc, I get "Expected 0 arguments, but got 1.".

<!-- provider -->
<script lang="ts">
  import type { Snippet } from "svelte";
	let { children }: { children: Snippet } = $props();
</script>

<button>
	{@render children("some value")}
</button>
image image

Reproduction

The following code with using VSCode.

<!-- provider -->
<script lang="ts">
  import type { Snippet } from "svelte";
	let { children }: { children: Snippet } = $props();
</script>

<button>
	{@render children("some value")}
</button>

Expected behaviour

It should not have any warning.

System Info

  • OS: macOS
  • IDE: VS Code

Which package is the issue about?

Svelte for VS Code extension

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions