mirror of https://github.com/sveltejs/svelte
Revert "feat: migrate `Component` to `ComponentExports<typeof Component>` in …" (#14070)
This reverts commit 4715dfaad2
.
pull/14052/head
parent
2784fb19f3
commit
37049b4171
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'svelte': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: migrate `Component` to `ComponentExports<typeof Component>` in TS
|
|
@ -1,18 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import Component from "./Component.svelte";
|
|
||||||
import type ComponentType from "./Component.svelte";
|
|
||||||
|
|
||||||
export let my_comp: Component;
|
|
||||||
|
|
||||||
export let my_component_type: ComponentType;
|
|
||||||
|
|
||||||
export function enhance(comp: Component, comp_type: ComponentType){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
let comp: Component | ComponentType | undefined = undefined;
|
|
||||||
|
|
||||||
export const the_comp: Component | ComponentType = comp;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<Component bind:this={comp} />
|
|
@ -1,22 +0,0 @@
|
|||||||
<script lang="ts">
|
|
||||||
import Component from "./Component.svelte";
|
|
||||||
import type ComponentType from "./Component.svelte";
|
|
||||||
|
|
||||||
|
|
||||||
interface Props {
|
|
||||||
my_comp: import('svelte').ComponentExports<typeof Component>;
|
|
||||||
my_component_type: import('svelte').ComponentExports<typeof ComponentType>;
|
|
||||||
}
|
|
||||||
|
|
||||||
let { my_comp, my_component_type }: Props = $props();
|
|
||||||
|
|
||||||
export function enhance(comp: import('svelte').ComponentExports<typeof Component>, comp_type: import('svelte').ComponentExports<typeof ComponentType>){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
let comp: import('svelte').ComponentExports<typeof Component> | import('svelte').ComponentExports<typeof ComponentType> | undefined = $state(undefined);
|
|
||||||
|
|
||||||
export const the_comp: import('svelte').ComponentExports<typeof Component> | import('svelte').ComponentExports<typeof ComponentType> = comp;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<Component bind:this={comp} />
|
|
Loading…
Reference in new issue