fix: add children to element typings (#9679)

* fix: add children to element typings

Add this here so that libraries doing `props$<HTMLButtonAttributes>()` don't need a separate interface
fixes #https://github.com/sveltejs/language-tools/issues/2218

* typo
pull/9692/head
Simon H 1 year ago committed by GitHub
parent aabab263ee
commit f9ba528265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: add children to element typings

@ -64,6 +64,10 @@ export type MessageEventHandler<T extends EventTarget> = EventHandler<MessageEve
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
export interface DOMAttributes<T extends EventTarget> { export interface DOMAttributes<T extends EventTarget> {
// Implicit children prop every element has
// Add this here so that libraries doing `$props<HTMLButtonAttributes>()` don't need a separate interface
children?: import('svelte').Snippet<any>;
// Clipboard Events // Clipboard Events
'on:copy'?: ClipboardEventHandler<T> | undefined | null; 'on:copy'?: ClipboardEventHandler<T> | undefined | null;
oncopy?: ClipboardEventHandler<T> | undefined | null; oncopy?: ClipboardEventHandler<T> | undefined | null;

Loading…
Cancel
Save