Fix generic props relationship in SvelteComponentTyped (#6400)

A recent refactoring commit where the constructor definition was moved to an interface disconnected the props relationship of the props that are passed in the constructor and the instance props
pull/6414/head
Simon H 3 years ago committed by GitHub
parent 6e9ecd8159
commit c5f588ee50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,6 +3,7 @@
## Unreleased ## Unreleased
* Fix type signatures of `writable` and `readable`. It's possible to invoke them without arguments ([#6291](https://github.com/sveltejs/svelte/issues/6291), [#6345](https://github.com/sveltejs/svelte/issues/6345)) * Fix type signatures of `writable` and `readable`. It's possible to invoke them without arguments ([#6291](https://github.com/sveltejs/svelte/issues/6291), [#6345](https://github.com/sveltejs/svelte/issues/6345))
* Fix generic props relationship in SvelteComponentTyped ([#6400](https://github.com/sveltejs/svelte/pull/6400))
## 3.38.2 ## 3.38.2

@ -104,7 +104,7 @@ export interface SvelteComponentDev {
$destroy(): void; $destroy(): void;
[accessor: string]: any; [accessor: string]: any;
} }
interface IComponentOptions { interface IComponentOptions<Props extends Record<string, any> = Record<string, any>> {
target: Element; target: Element;
anchor?: Element; anchor?: Element;
props?: Props; props?: Props;
@ -232,7 +232,7 @@ export class SvelteComponentTyped<
*/ */
$$slot_def: Slots; $$slot_def: Slots;
constructor(options: IComponentOptions) { constructor(options: IComponentOptions<Props>) {
super(options); super(options);
} }
} }

Loading…
Cancel
Save