From 999a05a3b73c522b732e149ac55f77fecd2ff1af Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 14 May 2025 09:06:26 -0400 Subject: [PATCH] regenerate --- packages/svelte/src/attachments/public.d.ts | 7 +++++++ packages/svelte/types/index.d.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/packages/svelte/src/attachments/public.d.ts b/packages/svelte/src/attachments/public.d.ts index d96c8b82fd..55771e26ff 100644 --- a/packages/svelte/src/attachments/public.d.ts +++ b/packages/svelte/src/attachments/public.d.ts @@ -1,3 +1,10 @@ +/** + * An [attachment](https://svelte.dev/docs/svelte/@attach) is a function that runs when an element is mounted + * to the DOM, and optionally returns a function that is called when the element is later removed. + * + * It can be attached to an element with an `{@attach ...}` tag, or by spreading an object containing + * a property created with [`createAttachmentKey`](https://svelte.dev/docs/svelte/svelte-attachments#createAttachmentKey). + */ export interface Attachment { (element: Element): void | (() => void); } diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index b601ce7673..68c13c7556 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -625,6 +625,13 @@ declare module 'svelte/animate' { } declare module 'svelte/attachments' { + /** + * An [attachment](https://svelte.dev/docs/svelte/@attach) is a function that runs when an element is mounted + * to the DOM, and optionally returns a function that is called when the element is later removed. + * + * It can be attached to an element with an `{@attach ...}` tag, or by spreading an object containing + * a property created with [`createAttachmentKey`](https://svelte.dev/docs/svelte/svelte-attachments#createAttachmentKey). + */ export interface Attachment { (element: Element): void | (() => void); }