File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' svelte ' : patch
3
+ ---
4
+
5
+ fix: make ` ComponentType ` generic optional
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ export type ComponentProps<Comp extends SvelteComponent> = Comp extends SvelteCo
177
177
* <svelte:component this={componentOfCertainSubType} needsThisProp="hello" />
178
178
* ```
179
179
*/
180
- export type ComponentType < Comp extends SvelteComponent > = ( new (
180
+ export type ComponentType < Comp extends SvelteComponent = SvelteComponent > = ( new (
181
181
options : ComponentConstructorOptions <
182
182
Comp extends SvelteComponent < infer Props > ? Props : Record < string , any >
183
183
>
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ declare module 'svelte' {
178
178
* <svelte:component this={componentOfCertainSubType} needsThisProp="hello" />
179
179
* ```
180
180
*/
181
- export type ComponentType < Comp extends SvelteComponent > = ( new (
181
+ export type ComponentType < Comp extends SvelteComponent = SvelteComponent > = ( new (
182
182
options : ComponentConstructorOptions <
183
183
Comp extends SvelteComponent < infer Props > ? Props : Record < string , any >
184
184
>
You can’t perform that action at this time.
0 commit comments