-
-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
I have this code:
<a
href={isSomething
? undefined
: `/${labels.plural}/${element.id}`}
>
and I'm getting this:
Found a link with a url that isn't resolved. eslint(svelte/no-navigation-without-resolve)
So I tried with:
<a
href={isSomething
? undefined
: resolve(`/${labels.plural}/${element.id}`)}
>
and I'm getting errors like this everywhere:
Found a link with a url that isn't resolved. eslint(svelte/no-navigation-without-resolve)
Argument of type '[`/${string}/${string}`]' is not assignable to parameter of type '[route: "/"] | [route: "/others"] | [route: "/others/"] | [route: "/stats"] | [route: "/stats/"] | [route: "/players"] | [route: "/players/"] | [route: "/players/1"] | [route: "/players/1/"] | ... 569 more ... | [route: ...]'.
Type '[`/${string}/${string}`]' is not assignable to type '[route: "/"] | [route: "/others"] | [route: "/others/"] | [route: "/stats"] | [route: "/stats/"] | [route: "/players"] | [route: "/players/"] | [route: "/players/1"] | [route: "/players/1/"] | ... 471 more ... | [route: ...]'.
Type '[`/${string}/${string}`]' is not assignable to type '[route: `/teams/${string}/edit/` & {}]'.
Type '`/${string}/${string}`' is not assignable to type '`/teams/${string}/edit/` & {}'.
Type '`/${string}/${string}`' is not assignable to type '`/teams/${string}/edit/`'.ts(2345)
What to do?
Thanks for your amazing work!
Metadata
Metadata
Assignees
Labels
No labels