@@ -1578,6 +1578,13 @@ declare module 'svelte/legacy' {
15781578 * @deprecated Use this only as a temporary solution to migrate your automatically delegated events in Svelte 5.
15791579 */
15801580 export function createBubbler ( ) : ( type : string ) => ( event : Event ) => boolean ;
1581+ /**
1582+ * Support using the component as both a class and function during the transition period
1583+ */
1584+ export type LegacyComponentType = {
1585+ new ( o : ComponentConstructorOptions ) : SvelteComponent ;
1586+ ( ...args : Parameters < Component < Record < string , any > > > ) : ReturnType < Component < Record < string , any > , Record < string , any > > > ;
1587+ } ;
15811588 /**
15821589 * Substitute for the `trusted` event modifier
15831590 * @deprecated
@@ -2308,17 +2315,9 @@ declare module 'svelte/types/compiler/interfaces' {
23082315} declare module '*.svelte' {
23092316 // use prettier-ignore for a while because of https://github.com/sveltejs/language-tools/commit/026111228b5814a9109cc4d779d37fb02955fb8b
23102317 // prettier-ignore
2311- import { SvelteComponent , Component , type ComponentConstructorOptions } from 'svelte'
2312-
2313- // Support using the component as both a class and function during the transition period
2314- // prettier-ignore
2315- interface ComponentType {
2316- (
2317- ...args : Parameters < Component < Record < string , any > > >
2318- ) : ReturnType < Component < Record < string , any > , Record < string , any > > >
2319- new ( o : ComponentConstructorOptions ) : SvelteComponent
2320- }
2321- const Comp : ComponentType ;
2318+ import { SvelteComponent } from 'svelte'
2319+ import { LegacyComponentType } from 'svelte/legacy' ;
2320+ const Comp : LegacyComponentType ;
23222321 type Comp = SvelteComponent ;
23232322 export default Comp ;
23242323}
0 commit comments