fix: remove constructor overload

The original intent was for typing generation tools like svelte2tsx to use the virtual constructor instead, but it does more harm than good. Most notably, the TS error message when props are wrong becomes completely useless. It's better for tooling to silence the deprecation message and switch over to a new virtual constructor once we remove the deprecated one.
pull/9633/head
Simon Holthausen 1 year ago
parent b7af2ffabd
commit cb4b1f0a18

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: remove constructor overload

@ -52,13 +52,6 @@ export class SvelteComponent<
Slots extends Record<string, any> = any
> {
[prop: string]: any;
/**
* For type checking capabilities only.
* Does not exist at runtime.
* ### DO NOT USE!
*/
constructor(props: Props);
/**
* @deprecated This constructor only exists when using the `asClassComponent` compatibility helper, which
* is a stop-gap solution. Migrate towards using `mount` or `createRoot` instead. See

Loading…
Cancel
Save