T
tRPC

❓-help

Subscription types are not inferred while queries and mutations are working fine

KKranga12/23/2023
I am NOT working with a monorepo but while query and mutation types are being inferred out of the box on the client side, subscriptions are always inferred as any no matter how simple their types are.
No description
KKranga12/23/2023
This is the subscription implementation, it is just attaching a listener to an event emitter via a simple wrapper class. I even tried being pedantic with the types but it does not work
No description
KKranga12/23/2023
The subscription input type is z.void() but I don't think it makes any difference

Looking for more? Join the community!