Skip to content

Commit b892999

Browse files
fix: add pending snippet to <svelte:boundary> types
1 parent 8e73fd4 commit b892999

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/svelte/svelte-html.d.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ declare global {
3737
): Key extends keyof ElementTagNameMap
3838
? ElementTagNameMap[Key]
3939
: Key extends keyof SVGElementTagNameMap
40-
? SVGElementTagNameMap[Key]
41-
: any;
40+
? SVGElementTagNameMap[Key]
41+
: any;
4242
function createElement<Elements extends IntrinsicElements, Key extends keyof Elements, T>(
4343
// "undefined | null" because of <svelte:element>
4444
element: Key | undefined | null,
@@ -47,14 +47,14 @@ declare global {
4747
): Key extends keyof ElementTagNameMap
4848
? ElementTagNameMap[Key]
4949
: Key extends keyof SVGElementTagNameMap
50-
? SVGElementTagNameMap[Key]
51-
: any;
50+
? SVGElementTagNameMap[Key]
51+
: any;
5252

5353
// For backwards-compatibility and ease-of-use, in case someone enhanced the typings from import('svelte/elements').HTMLAttributes/SVGAttributes
5454
// eslint-disable-next-line @typescript-eslint/no-unused-vars
55-
interface HTMLAttributes<T extends EventTarget = any> {}
55+
interface HTMLAttributes<T extends EventTarget = any> { }
5656
// eslint-disable-next-line @typescript-eslint/no-unused-vars
57-
interface SVGAttributes<T extends EventTarget = any> {}
57+
interface SVGAttributes<T extends EventTarget = any> { }
5858

5959
/**
6060
* Avoid using this interface directly. Instead use the `SvelteHTMLElements` interface exported by `svelte/elements`
@@ -247,6 +247,7 @@ declare global {
247247
'svelte:boundary': {
248248
onerror?: (error: unknown, reset: () => void) => void;
249249
failed?: import('svelte').Snippet<[error: unknown, reset: () => void]>;
250+
pending?: import('svelte').Snippet;
250251
};
251252
// don't type svelte:options, it would override the types in svelte/elements and it isn't extendable anyway
252253

0 commit comments

Comments
 (0)