tinro icon indicating copy to clipboard operation
tinro copied to clipboard

Type definitions missing for Route component

Open gurumaxi opened this issue 2 years ago • 1 comments

I am using svelte in combination with Typescript. When importing and using the Route component, I get the following error and suggestion:

Argument of type 'typeof Route' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'.

Possible causes:
- You use the instance type of a component where you should use the constructor type
- Type definitions are missing for this Svelte Component. If you are using Svelte 3.31+, use SvelteComponentTyped to add a definition:
  import type { SvelteComponentTyped } from "svelte";
  class ComponentName extends SvelteComponentTyped<{propertyName: string;}> {}

Is it possible to add this type definition for the route component?

gurumaxi avatar Aug 18 '22 15:08 gurumaxi

Is there a way not to use svelte-spa-router at all with this bug? I am facing the same problem.

bluszcz avatar Jul 06 '24 23:07 bluszcz