diff --git a/packages/svelte/src/legacy/legacy-client.js b/packages/svelte/src/legacy/legacy-client.js index 19bdd6b08918..7ca202cf73bf 100644 --- a/packages/svelte/src/legacy/legacy-client.js +++ b/packages/svelte/src/legacy/legacy-client.js @@ -65,7 +65,7 @@ export function asClassComponent(component) { /** * Support using the component as both a class and function during the transition period - * @typedef {{new: (o: ComponentConstructorOptions) => SvelteComponent} & ((...args: Parameters>>) => ReturnType, Record>>)} LegacyComponentType + * @typedef {{new (o: ComponentConstructorOptions): SvelteComponent;(...args: Parameters>>): ReturnType, Record>>;}} LegacyComponentType */ class Svelte4Component { diff --git a/packages/svelte/types/index.d.ts b/packages/svelte/types/index.d.ts index e8ce22b08a11..01119e748572 100644 --- a/packages/svelte/types/index.d.ts +++ b/packages/svelte/types/index.d.ts @@ -1582,8 +1582,9 @@ declare module 'svelte/legacy' { * Support using the component as both a class and function during the transition period */ export type LegacyComponentType = { - new: (o: ComponentConstructorOptions) => SvelteComponent; - } & ((...args: Parameters>>) => ReturnType, Record>>); + new (o: ComponentConstructorOptions): SvelteComponent; + (...args: Parameters>>): ReturnType, Record>>; + }; /** * Substitute for the `trusted` event modifier * @deprecated