Skip to content
Discussion options

You must be logged in to vote

I found the root cause of the problem. It wasn't the router. I used a zod schema to validate query params in routers. The schema was built in the shared package and emitted typescript declarations.
Those declarations caused Schema.parse to return any instead of the correct type. Because of that all routes had broken type.
I replaced import z form 'zod' to import { z } from 'zod' and it's fixed the issue.
Thank you.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@andrikotliar
Comment options

Answer selected by andrikotliar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants