Skip to content

why I got this ts error in src/router.ts? #10

@DF-5C

Description

@DF-5C

the error is ↓:
Type 'typeof NotFound__SvelteComponent_' is not assignable to type 'typeof SvelteComponent'.
Types of construct signatures are incompatible.
Type 'new (options: ComponentConstructorOptions<Record<string, never>>) => NotFound__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) => SvelteComponent<...>'.
Types of parameters 'options' and 'options' are incompatible.
Type 'ComponentConstructorOptions' is not assignable to type 'ComponentConstructorOptions<Record<string, never>>'.ts(2322)
index.d.ts(87, 13): The expected type comes from property 'component' which is declared here on type '{ path: string; component?: typeof SvelteComponent | undefined; lazyComponent?: { fallback?: typeof SvelteComponent | undefined; loading?: typeof SvelteComponent | undefined; component: () => Promise<...>; } | undefined; props?: unknown; }'

ts_error

What can I do to fix this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions