I have the following code:
import TodosStatus from './TodosStatus.svelte';
let todosStatus: Component<TodosStatus>; // reference to TodosStatus instance
...
<TodosStatus bind:this={todosStatus} />
And I get the following error:
Type 'SvelteComponent<$$ComponentProps, { [evt: string]: CustomEvent<any>; }, {}> & { $$bindings?: "" | undefined; } & { focus: () => any; }' is not assignable to type 'Component<SvelteComponent<$$ComponentProps, { [evt: string]: CustomEvent<any>; }, {}> & { $$bindings?: "" | undefined; } & { focus: () => any; }, {}, string>'.
Type 'SvelteComponent<$$ComponentProps, { [evt: string]: CustomEvent<any>; }, {}> & { $$bindings?: "" | undefined; } & { focus: () => any; }' provides no match for the signature '(this: void, internals: Brand<"ComponentInternals">, props: SvelteComponent<$$ComponentProps, { [evt: string]: CustomEvent<any>; }, {}> & { ...; } & { ...; }): { ...; }'.ts(2322)
What’s the correct way to type a Svelte component in svelte 5?