@trpc/tanstack-react-query 0.0.0-alpha.1 → 0.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { type QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
2
|
+
import type { inferRouterClient } from '@trpc/client';
|
|
3
3
|
import type { AnyTRPCRouter } from '@trpc/server';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { type TRPCOptionsProxy } from './createOptionsProxy';
|
|
6
|
+
type AnyTRPCClient = inferRouterClient<AnyTRPCRouter>;
|
|
6
7
|
export declare function createTRPCContext<TRouter extends AnyTRPCRouter>(): {
|
|
7
8
|
TRPCProvider: (props: Readonly<{
|
|
8
9
|
children: React.ReactNode;
|
|
9
10
|
queryClient: QueryClient;
|
|
10
|
-
trpcClient:
|
|
11
|
+
trpcClient: AnyTRPCClient;
|
|
11
12
|
}>) => React.JSX.Element;
|
|
12
13
|
useTRPC: () => TRPCOptionsProxy<TRouter>;
|
|
13
14
|
};
|
|
15
|
+
export {};
|
|
14
16
|
//# sourceMappingURL=Context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../src/internals/Context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Context.d.ts","sourceRoot":"","sources":["../../src/internals/Context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAG9B,KAAK,aAAa,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;AAEtD,wBAAgB,iBAAiB,CAAC,OAAO,SAAS,aAAa;0BAMpD,QAAQ,CAAC;QACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,WAAW,EAAE,WAAW,CAAC;QACzB,UAAU,EAAE,aAAa,CAAC;KAC3B,CAAC;;EA0BL"}
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@ export function createTRPCContext<TRouter extends AnyTRPCRouter>() {
|
|
|
16
16
|
props: Readonly<{
|
|
17
17
|
children: React.ReactNode;
|
|
18
18
|
queryClient: QueryClient;
|
|
19
|
-
trpcClient: CreateTRPCClient<
|
|
19
|
+
trpcClient: CreateTRPCClient<TRouter>;
|
|
20
20
|
}>,
|
|
21
21
|
) {
|
|
22
22
|
const value = React.useMemo(
|