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 = {
453
453
state . str . overwrite (
454
454
node . start ,
455
455
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 ) } >`
457
457
) ;
458
458
}
459
459
}
Original file line number Diff line number Diff line change 4
4
5
5
6
6
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 >;
9
9
}
10
10
11
11
let { my_comp, my_component_type }: Props = $props ();
12
12
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 >){
14
14
15
15
}
16
16
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 );
18
18
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 ;
20
20
</script >
21
21
22
22
<Component bind:this ={comp } />
You can’t perform that action at this time.
0 commit comments