lunacraftsL
tRPC2y ago
7 replies
lunacrafts

Using tRPC (createCallerFactory) with react-query.

Hey guys. Do you know any recipe that would make that approach possible?

I'm receiving following error:
Property 'runtime' is missing in type 'DecoratedProcedureRecord<{ subscribe: Router<{ _config: RootConfig<{ ctx: RevPopClientContext; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>; ... 5 more ...; subscriptions: {}; }> & { ...; }; }> & { ...; }' but required in type 'TRPCClient<Router<{ _config: RootConfig<{ ctx: RevPopClientContext; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>; ... 5 more ...; subscriptions: {}; }> & { ...; }>'.ts(2741)
createTRPCClient.d.ts(11, 14): 'runtime' is declared here.
context.d.ts(17, 5): The expected type comes from property 'client' which is declared here on type 'IntrinsicAttributes & TRPCProviderProps<Router<{ _config: RootConfig<{ ctx: RevPopClientContext; meta: object; errorShape: DefaultErrorShape; transformer: DefaultDataTransformer; }>; ... 5 more ...; subscriptions: {}; }> & { ...; }, unknown>'
Screenshot_2024-05-28_at_15.18.16.png
Was this page helpful?