TanStackT
TanStack14mo ago
10 replies
hurt-tomato

TS error in the beforeLoad example (throwing the wrong type)

Hello, I have a TS error with this example : https://tanstack.com/router/v1/docs/framework/react/guide/authenticated-routes#redirecting

The error is located at throw redirect({ to: '/login' });

The error is :

Expected an error object to be thrown.eslint@typescript-eslint/only-throw-error

The code works as expected tho.

I'm on this version: "@tanstack/react-router": "^1.26.9"
Was this page helpful?