Minimal router tests type error
Hi!
I want to have a minimal router for testing, but I have defined a type for router, and now this is giving me a type error.
'__store.state' are incompatible between these types.
How can I adjust my minimal router to fit the type, or adjust the type to fit my minimal router?
Here are my types/interfaces for the actual router:
This is the error I get:
'__store.state' are incompatible between these types.
Here is my minimal router used for testing:

5 Replies
dependent-tanOP•2y ago
I followed the examples when declaring the type for router, but is it ok to do this instead? With this I get no error. But maybe its defeating the purpose?
This (below) is still giving me the same error, not sure what __store.state' is:
deep-jade•2y ago
do you have multiple
declare module '@tanstack/react-router' in your project?
if yes, they probably conflict and produce the error you sawdependent-tanOP•2y ago
I only have one, but the router in my test does not follow the type declared for router, and I cant figure out how to make it the same type 😦
deep-jade•2y ago
@ErwannRousseau looks like you have the same issue somehow
correct-apricot•2y ago
absolutely I have the same error from the upgrade from
1.29.2 to 1.34.9
this code works well :
but I have an error here now : router={router}
type error. '__store.state' are incompatible between these types.