File tree 4 files changed +13
-0
lines changed
4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " svelte " : patch
3
+ ---
4
+
5
+ fix: make static ` element ` property available for the SvelteComponent type
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ export class SvelteComponent<
59
59
Events extends Record < string , any > = any ,
60
60
Slots extends Record < string , any > = any
61
61
> {
62
+ /** The custom element version of the component. Only present if compiled with the `customElement` compiler option */
63
+ static element ?: typeof HTMLElement ;
64
+
62
65
[ prop : string ] : any ;
63
66
/**
64
67
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
Original file line number Diff line number Diff line change 8
8
hydrate
9
9
} from 'svelte' ;
10
10
11
+ SvelteComponent . element === HTMLElement ;
12
+
11
13
// --------------------------------------------------------------------------- legacy: classes
12
14
13
15
class LegacyComponent extends SvelteComponent <
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ declare module 'svelte' {
60
60
Events extends Record < string , any > = any ,
61
61
Slots extends Record < string , any > = any
62
62
> {
63
+ /** The custom element version of the component. Only present if compiled with the `customElement` compiler option */
64
+ static element ?: typeof HTMLElement ;
65
+
63
66
[ prop : string ] : any ;
64
67
/**
65
68
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
You can’t perform that action at this time.
0 commit comments