Here is a cool thing we can do in Svelte 5 with Runes. Let's say we make a little utility type like this:
type Holocene<T> = T extends { extends: keyof SvelteHTMLElements }
? Omit<Partial<SvelteHTMLElements[T['extends']]>, keyof T> & Omit<T, 'extends'>
: T;
Now, we can pass an extends
key to the type we give to the props of a component and it will automatically inherit whatever HTML element we choose.