File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
tests/migrate/samples/component-type Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,7 @@ const instance_script = {
453453 state . str . overwrite (
454454 node . start ,
455455 node . end ,
456- `ReturnType <typeof ${ state . str . original . substring ( node . start , node . end ) } >`
456+ `import('svelte').ComponentExports <typeof ${ state . str . original . substring ( node . start , node . end ) } >`
457457 ) ;
458458 }
459459 }
Original file line number Diff line number Diff line change 44
55
66 interface Props {
7- my_comp: ReturnType <typeof Component >;
8- my_component_type: ReturnType <typeof ComponentType >;
7+ my_comp: import ( ' svelte ' ). ComponentExports <typeof Component >;
8+ my_component_type: import ( ' svelte ' ). ComponentExports <typeof ComponentType >;
99 }
1010
1111 let { my_comp, my_component_type }: Props = $props ();
1212
13- export function enhance(comp : ReturnType <typeof Component >, comp_type : ReturnType <typeof ComponentType >){
13+ export function enhance(comp : import ( ' svelte ' ). ComponentExports <typeof Component >, comp_type : import ( ' svelte ' ). ComponentExports <typeof ComponentType >){
1414
1515 }
1616
17- let comp: ReturnType <typeof Component > | ReturnType <typeof ComponentType > | undefined = $state (undefined );
17+ let comp: import ( ' svelte ' ). ComponentExports <typeof Component > | import ( ' svelte ' ). ComponentExports <typeof ComponentType > | undefined = $state (undefined );
1818
19- export const the_comp: ReturnType <typeof Component > | ReturnType <typeof ComponentType > = comp ;
19+ export const the_comp: import ( ' svelte ' ). ComponentExports <typeof Component > | import ( ' svelte ' ). ComponentExports <typeof ComponentType > = comp ;
2020 </script >
2121
2222<Component bind:this ={comp } />
You can’t perform that action at this time.
0 commit comments