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
+ */
1
8
export interface Attachment {
2
9
( element : Element ) : void | ( ( ) => void ) ;
3
10
}
Original file line number Diff line number Diff line change @@ -625,6 +625,13 @@ declare module 'svelte/animate' {
625
625
}
626
626
627
627
declare 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
+ */
628
635
export interface Attachment {
629
636
( element : Element ) : void | ( ( ) => void ) ;
630
637
}
You can’t perform that action at this time.
0 commit comments