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
177177 * <svelte:component this={componentOfCertainSubType} needsThisProp="hello" />
178178 * ```
179179 */
180- export type ComponentType < Comp extends SvelteComponent > = ( new (
180+ export type ComponentType < Comp extends SvelteComponent = SvelteComponent > = ( new (
181181 options : ComponentConstructorOptions <
182182 Comp extends SvelteComponent < infer Props > ? Props : Record < string , any >
183183 >
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ declare module 'svelte' {
178178 * <svelte:component this={componentOfCertainSubType} needsThisProp="hello" />
179179 * ```
180180 */
181- export type ComponentType < Comp extends SvelteComponent > = ( new (
181+ export type ComponentType < Comp extends SvelteComponent = SvelteComponent > = ( new (
182182 options : ComponentConstructorOptions <
183183 Comp extends SvelteComponent < infer Props > ? Props : Record < string , any >
184184 >
You can’t perform that action at this time.
0 commit comments