fix: allow instrinsic `<svelte:...>` elements to inherit from `SvelteHTMLElements` (#16424)

pull/16426/head
Rich Harris 2 months ago committed by GitHub
parent 6c9717a91f
commit 98fb1b1f8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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