Astro Info
Astro v6.1.3
Node v25.8.2
System macOS (arm64)
Package Manager bun
Output static
Adapter none
Integrations @astrojs/svelte
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Issue: Astro cannot render svelte-sonner Toaster component directly due to Svelte 5 type incompatibility
When importing Toaster from svelte-sonner in an Astro file:
---
import { Toaster } from "svelte-sonner";
---
<Toaster />
Astro reports a type error: Type {} is not assignable because it's missing required properties (loadingIcon, successIcon, errorIcon, warningIcon, and 11 more).
These props are Svelte 5 snippets with default values — they're optional in Svelte but Astro's type checker treats them as required because it cannot properly interpret Svelte 5's snippet prop types.
sample: https://stackblitz.com/edit/github-jxscecjp-ddvyzwsh
Astro: Type { "client:only": string; } is not assignable to type
IntrinsicAttributes & StripNeverIndexSignatures<WidenChildrenIfSnippet<{
invert?: boolean | undefined;
position?: string | undefined;
hotkey?: any[] | undefined;
expand?: boolean | undefined;
closeButton?: boolean | undefined;
... 26 more ...;
onpointerup: any;
} & Record<...>>> & AstroComponentDirectives
Type { "client:only": string; } is missing the following properties from type
StripNeverIndexSignatures<WidenChildrenIfSnippet<{
invert?: boolean | undefined;
position?: string | undefined;
hotkey?: any[] | undefined;
expand?: boolean | undefined;
closeButton?: boolean | undefined;
offset?: "24px" | undefined;
... 25 more ...;
onpointerup: any;
} & Record<...>>>
:
loadingIcon, successIcon, errorIcon, warningIcon
, and 11 more.
What's the expected result?
Astro properly handle Svelte 5 snippet props without type error.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-jxscecjp-ddvyzwsh
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Issue: Astro cannot render svelte-sonner Toaster component directly due to Svelte 5 type incompatibility
When importing Toaster from svelte-sonner in an Astro file:
Astro reports a type error: Type {} is not assignable because it's missing required properties (loadingIcon, successIcon, errorIcon, warningIcon, and 11 more).
These props are Svelte 5 snippets with default values — they're optional in Svelte but Astro's type checker treats them as required because it cannot properly interpret Svelte 5's snippet prop types.
sample: https://stackblitz.com/edit/github-jxscecjp-ddvyzwsh
What's the expected result?
Astro properly handle Svelte 5 snippet props without type error.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-jxscecjp-ddvyzwsh
Participation