From dcdd645480ab412eb563632e70801f4d61c1d787 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Wed, 6 Dec 2023 17:14:35 +0100 Subject: [PATCH] fix: adjust children snippet default type Needs to be void so that zero args are passed to it fixes #9744 --- .changeset/tasty-numbers-perform.md | 5 +++++ packages/svelte/elements.d.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tasty-numbers-perform.md diff --git a/.changeset/tasty-numbers-perform.md b/.changeset/tasty-numbers-perform.md new file mode 100644 index 0000000000..b5447fe325 --- /dev/null +++ b/.changeset/tasty-numbers-perform.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: adjust children snippet default type diff --git a/packages/svelte/elements.d.ts b/packages/svelte/elements.d.ts index 4c3bef74f2..a456340283 100644 --- a/packages/svelte/elements.d.ts +++ b/packages/svelte/elements.d.ts @@ -66,7 +66,7 @@ export type MessageEventHandler = EventHandler { // Implicit children prop every element has // Add this here so that libraries doing `$props()` don't need a separate interface - children?: import('svelte').Snippet; + children?: import('svelte').Snippet; // Clipboard Events 'on:copy'?: ClipboardEventHandler | undefined | null;