fix: allow instrinsic `<svelte:...>` elements to inherit from `SvelteHTMLElements`

pull/16424/head
Rich Harris 2 months ago
parent 6c9717a91f
commit 7a4a9d0a80

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: allow instrinsic `<svelte:...>` elements to inherit from `SvelteHTMLElements`

@ -239,18 +239,6 @@ declare global {
use: HTMLProps<'use', SVGAttributes>;
view: HTMLProps<'view', SVGAttributes>;
// Svelte specific
'svelte:window': HTMLProps<'svelte:window', HTMLAttributes>;
'svelte:body': HTMLProps<'svelte:body', HTMLAttributes>;
'svelte:document': HTMLProps<'svelte:document', HTMLAttributes>;
'svelte:fragment': { slot?: string };
'svelte:head': { [name: string]: any };
'svelte:boundary': {
onerror?: (error: unknown, reset: () => void) => void;
failed?: import('svelte').Snippet<[error: unknown, reset: () => void]>;
};
// don't type svelte:options, it would override the types in svelte/elements and it isn't extendable anyway
[name: string]: { [name: string]: any };
}
}

Loading…
Cancel
Save