File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * An [attachment](https://svelte.dev/docs/svelte/@attach) is a function that runs when an element is mounted
3+ * to the DOM, and optionally returns a function that is called when the element is later removed.
4+ *
5+ * It can be attached to an element with an `{@attach ...}` tag, or by spreading an object containing
6+ * a property created with [`createAttachmentKey`](https://svelte.dev/docs/svelte/svelte-attachments#createAttachmentKey).
7+ */
18export interface Attachment {
29 ( element : Element ) : void | ( ( ) => void ) ;
310}
Original file line number Diff line number Diff line change @@ -625,6 +625,13 @@ declare module 'svelte/animate' {
625625}
626626
627627declare module 'svelte/attachments' {
628+ /**
629+ * An [attachment](https://svelte.dev/docs/svelte/@attach) is a function that runs when an element is mounted
630+ * to the DOM, and optionally returns a function that is called when the element is later removed.
631+ *
632+ * It can be attached to an element with an `{@attach ...}` tag, or by spreading an object containing
633+ * a property created with [`createAttachmentKey`](https://svelte.dev/docs/svelte/svelte-attachments#createAttachmentKey).
634+ */
628635 export interface Attachment {
629636 ( element : Element ) : void | ( ( ) => void ) ;
630637 }
You can’t perform that action at this time.
0 commit comments