You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried with the following syntax as according to the example provided but it returned an error.
<Route path="/" component={Home} />
The error:
Type 'typeof Home__SvelteComponent_' is not assignable to type 'typeof SvelteComponent | AsyncSvelteComponent'.
Type 'typeof Home__SvelteComponent_' is not assignable to type 'typeof SvelteComponent'.
Types of construct signatures are incompatible.
Type 'new (options: ComponentConstructorOptions<Record<string, never>>) => Home__SvelteComponent_' is not assignable to type 'new <Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any>(options: ComponentConstructorOptions<Props>) => SvelteComponent<...>'.
Types of parameters 'options' and 'options' are incompatible.
Type 'ComponentConstructorOptions<Props>' is not assignable to type 'ComponentConstructorOptions<Record<string, never>>'.
Type 'Props' is not assignable to type 'Record<string, never>'.
Type 'Record<string, any>' is not assignable to type 'Record<string, never>'.
'string' index signatures are incompatible.
Type 'any' is not assignable to type 'never'.ts(2322)
However, the syntax below works:
<Route path="/">
<Home />
</Route>
I'm not knowledgable enough in the Svelte ecosystem to pinpoint if this is some versioning issue or something went wrong on my end, but I would be happy to submit a PR to update the example code to the non-problematic syntax.
The text was updated successfully, but these errors were encountered:
Hi, I recently setup a project with
vite
+svelte-ts
with the following dependency versionsI tried with the following syntax as according to the example provided but it returned an error.
<Route path="/" component={Home} />
The error:
However, the syntax below works:
I'm not knowledgable enough in the Svelte ecosystem to pinpoint if this is some versioning issue or something went wrong on my end, but I would be happy to submit a PR to update the example code to the non-problematic syntax.
The text was updated successfully, but these errors were encountered: