@@ -24,23 +24,7 @@ declare class Svelte2TsxComponent<
2424 */
2525 $$slot_def : Slots ;
2626 // https://svelte.dev/docs#Client-side_component_API
27- constructor ( options : {
28- /**
29- * An HTMLElement to render to. This option is required.
30- */
31- target : Element ;
32- /**
33- * A child of `target` to render the component immediately before.
34- */
35- anchor ?: Element ;
36- /**
37- * An object of properties to supply to the component.
38- */
39- props ?: Props ;
40- hydrate ?: boolean ;
41- intro ?: boolean ;
42- $$inline ?: boolean ;
43- } ) ;
27+ constructor ( options : Svelte2TsxComponentConstructorParameters < Props > ) ;
4428 /**
4529 * Causes the callback function to be called whenever the component dispatches an event.
4630 * A function is returned that will remove the event listener when called.
@@ -62,7 +46,26 @@ declare class Svelte2TsxComponent<
6246 $inject_state ( ) : void ;
6347}
6448
65- type AConstructorTypeOf < T > = new ( ...args : any [ ] ) => T ;
49+ interface Svelte2TsxComponentConstructorParameters < Props extends { } > {
50+ /**
51+ * An HTMLElement to render to. This option is required.
52+ */
53+ target : Element ;
54+ /**
55+ * A child of `target` to render the component immediately before.
56+ */
57+ anchor ?: Element ;
58+ /**
59+ * An object of properties to supply to the component.
60+ */
61+ props ?: Props ;
62+ hydrate ?: boolean ;
63+ intro ?: boolean ;
64+ $$inline ?: boolean ;
65+ }
66+
67+ type AConstructorTypeOf < T , U extends any [ ] = any [ ] > = new ( ...args : U ) => T ;
68+ type SvelteComponentConstructor < T , U extends Svelte2TsxComponentConstructorParameters < any > > = new ( options : U ) => T ;
6669
6770type SvelteAction < U extends any [ ] , El extends any > = ( node : El , ...args :U ) => {
6871 update ?: ( ...args :U ) => void ,
@@ -174,7 +177,7 @@ declare function __sveltets_each<T>(
174177
175178declare function createSvelte2TsxComponent < Props , Events , Slots > (
176179 render : ( ) => { props ?: Props , events ?: Events , slots ?: Slots }
177- ) : AConstructorTypeOf < Svelte2TsxComponent < Props , Events , Slots > > ;
180+ ) : SvelteComponentConstructor < Svelte2TsxComponent < Props , Events , Slots > , Svelte2TsxComponentConstructorParameters < Props > > ;
178181
179182declare function __sveltets_unwrapArr < T > ( arr : ArrayLike < T > ) : T
180183declare function __sveltets_unwrapPromiseLike < T > ( promise : PromiseLike < T > | T ) : T
0 commit comments