@trpc/react-query 11.0.0-next-alpha.154 → 11.0.0-next-alpha.155
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.
- package/dist/bundle-analysis.json +25 -25
- package/dist/createTRPCQueryUtils.d.ts +2 -2
- package/dist/createTRPCQueryUtils.d.ts.map +1 -1
- package/dist/createTRPCReact.d.ts +7 -7
- package/dist/createTRPCReact.d.ts.map +1 -1
- package/dist/internals/context.d.ts +5 -6
- package/dist/internals/context.d.ts.map +1 -1
- package/dist/internals/getClientArgs.d.ts +1 -1
- package/dist/internals/getClientArgs.d.ts.map +1 -1
- package/dist/internals/getQueryKey.d.ts +2 -2
- package/dist/internals/getQueryKey.d.ts.map +1 -1
- package/dist/internals/useQueries.d.ts +3 -3
- package/dist/internals/useQueries.d.ts.map +1 -1
- package/dist/server/ssgProxy.d.ts +5 -4
- package/dist/server/ssgProxy.d.ts.map +1 -1
- package/dist/shared/hooks/createHooksInternal.d.ts +5 -5
- package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -1
- package/dist/shared/hooks/types.d.ts +7 -7
- package/dist/shared/hooks/types.d.ts.map +1 -1
- package/dist/shared/polymorphism/mutationLike.d.ts +2 -2
- package/dist/shared/polymorphism/mutationLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/queryLike.d.ts +2 -2
- package/dist/shared/polymorphism/queryLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/routerLike.d.ts +3 -3
- package/dist/shared/polymorphism/routerLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/utilsLike.d.ts +2 -2
- package/dist/shared/polymorphism/utilsLike.d.ts.map +1 -1
- package/dist/shared/proxy/decorationProxy.d.ts +2 -2
- package/dist/shared/proxy/decorationProxy.d.ts.map +1 -1
- package/dist/shared/proxy/useQueriesProxy.d.ts +3 -3
- package/dist/shared/proxy/useQueriesProxy.d.ts.map +1 -1
- package/dist/shared/proxy/utilsProxy.d.ts +6 -6
- package/dist/shared/proxy/utilsProxy.d.ts.map +1 -1
- package/dist/shared/queryClient.d.ts +2 -1
- package/dist/shared/queryClient.d.ts.map +1 -1
- package/dist/shared/types.d.ts +2 -2
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/utils/createUtilityFunctions.d.ts +5 -4
- package/dist/utils/createUtilityFunctions.d.ts.map +1 -1
- package/dist/utils/inferReactQueryProcedure.d.ts +3 -3
- package/dist/utils/inferReactQueryProcedure.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/createTRPCQueryUtils.tsx +3 -5
- package/src/createTRPCReact.tsx +13 -15
- package/src/internals/context.tsx +5 -6
- package/src/internals/getClientArgs.ts +1 -1
- package/src/internals/getQueryKey.ts +2 -2
- package/src/internals/useQueries.ts +3 -3
- package/src/server/ssgProxy.ts +12 -15
- package/src/shared/hooks/createHooksInternal.tsx +10 -11
- package/src/shared/hooks/types.ts +7 -7
- package/src/shared/polymorphism/mutationLike.ts +2 -2
- package/src/shared/polymorphism/queryLike.ts +2 -2
- package/src/shared/polymorphism/routerLike.ts +3 -3
- package/src/shared/polymorphism/utilsLike.ts +2 -2
- package/src/shared/proxy/decorationProxy.ts +3 -2
- package/src/shared/proxy/useQueriesProxy.ts +6 -6
- package/src/shared/proxy/utilsProxy.ts +10 -13
- package/src/shared/queryClient.ts +2 -1
- package/src/shared/types.ts +2 -2
- package/src/utils/createUtilityFunctions.ts +5 -8
- package/src/utils/inferReactQueryProcedure.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utilsProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/utilsProxy.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utilsProxy.d.ts","sourceRoot":"","sources":["../../../src/shared/proxy/utilsProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,EACL,cAAc,EACd,mBAAmB,EACnB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qB,CACvB,yBAAyB,CAAC,OAAO,EAAE,WAAW,CAAC,EAC/C,6BAA6B,CAAC,OAAO,CAAC,CACvC,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,OAAO,SAAS,SAAS,IACpD,6BAA6B,CAAC,OAAO,CAAC,CAAC;AAEzC,eAAO,MAAM,YAAY,aACb,MAAM,qBAAqB,KACpC,SAqBF,CAAC;AA2CF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,SAAS,EAAE,WAAW,EAC1E,OAAO,EAAE,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,kHAelD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,SAAS,EAC7D,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,GAC/B,gBAAgB,CAAC,OAAO,CAAC,CAI3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryClient.d.ts","sourceRoot":"","sources":["../../src/shared/queryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"queryClient.d.ts","sourceRoot":"","sources":["../../src/shared/queryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,gCAAgC,GACxC;IACE,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,iBAAiB,CAAC,EAAE,KAAK,CAAC;CAC3B,GACD;IACE,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,cAAc,WAAY,gCAAgC,gBACN,CAAC"}
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
3
|
-
import { AnyRouter, MaybePromise } from '@trpc/core';
|
|
2
|
+
import type { QueryClient } from '@tanstack/react-query';
|
|
3
|
+
import type { AnyRouter, MaybePromise } from '@trpc/core';
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,CAAC,IAAI,EAAE;QAChB;;WAEG;QACH,UAAU,EAAE,MAAM,YAAY,CAAC,OAAO,CAAC,CAAC;QACxC,WAAW,EAAE,WAAW,CAAC;QACzB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAC/B,KAAK,YAAY,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB,CAAC,QAAQ,SAAS,SAAS;IAChE;;OAEG;IACH,SAAS,CAAC,EAAE;QACV,WAAW,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;KAC5C,CAAC;IAEF;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;CAC9B"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { CreateTRPCClient
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import type { CreateTRPCClient } from '@trpc/client';
|
|
3
|
+
import { TRPCUntypedClient } from '@trpc/client';
|
|
4
|
+
import type { AnyRouter } from '@trpc/core';
|
|
5
|
+
import type { TRPCQueryUtils } from '../shared';
|
|
5
6
|
export interface CreateQueryUtilsOptions<TRouter extends AnyRouter> {
|
|
6
7
|
/**
|
|
7
8
|
* The `TRPCClient`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUtilityFunctions.d.ts","sourceRoot":"","sources":["../../src/utils/createUtilityFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"createUtilityFunctions.d.ts","sourceRoot":"","sources":["../../src/utils/createUtilityFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAoB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,uBAAuB,CAAC,OAAO,SAAS,SAAS;IAChE;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC/D;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,SAAS,SAAS,EAC9D,IAAI,EAAE,uBAAuB,CAAC,OAAO,CAAC,GACrC,cAAc,CAAC,OAAO,CAAC,CA8GzB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
-
import { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
3
|
-
import { UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCQueryOptions, UseTRPCQueryResult } from '../shared';
|
|
1
|
+
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
+
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, inferProcedureInput, inferTransformedProcedureOutput } from '@trpc/core';
|
|
3
|
+
import type { UseTRPCMutationOptions, UseTRPCMutationResult, UseTRPCQueryOptions, UseTRPCQueryResult } from '../shared';
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inferReactQueryProcedure.d.ts","sourceRoot":"","sources":["../../src/utils/inferReactQueryProcedure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"inferReactQueryProcedure.d.ts","sourceRoot":"","sources":["../../src/utils/inferReactQueryProcedure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,+BAA+B,EAChC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,WAAW,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAC3B,OAAO,SAAS,aAAa,EAC7B,UAAU,SAAS,YAAY,EAC/B,KAAK,GAAG,+BAA+B,CAAC,OAAO,EAAE,UAAU,CAAC,IAC1D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CAAC,EAAE,kBAAkB,CAAC,GACpE,kBAAkB,SAAS,iBAAiB,GAC5C,iBAAiB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC,GACjE,KAAK,GACP,KAAK;CACV,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/react-query",
|
|
3
|
-
"version": "11.0.0-next-alpha.
|
|
3
|
+
"version": "11.0.0-next-alpha.155+b93149c63",
|
|
4
4
|
"description": "The tRPC React library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@trpc/core": "11.0.0-next-alpha.
|
|
60
|
+
"@trpc/core": "11.0.0-next-alpha.155+b93149c63"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@tanstack/react-query": "^5.0.0",
|
|
64
|
-
"@trpc/client": "11.0.0-next-alpha.
|
|
64
|
+
"@trpc/client": "11.0.0-next-alpha.155+b93149c63",
|
|
65
65
|
"react": ">=18.2.0",
|
|
66
66
|
"react-dom": ">=18.2.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@tanstack/react-query": "^5.0.0",
|
|
70
|
-
"@trpc/client": "11.0.0-next-alpha.
|
|
70
|
+
"@trpc/client": "11.0.0-next-alpha.155+b93149c63",
|
|
71
71
|
"@types/express": "^4.17.17",
|
|
72
72
|
"@types/node": "^20.10.0",
|
|
73
73
|
"@types/react": "^18.2.33",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"funding": [
|
|
87
87
|
"https://trpc.io/sponsor"
|
|
88
88
|
],
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "b93149c63192bc113ef45f43188fbd993df39027"
|
|
90
90
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
2
|
import { createQueryUtilsProxy } from './shared';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
createUtilityFunctions,
|
|
6
|
-
} from './utils/createUtilityFunctions';
|
|
3
|
+
import type { CreateQueryUtilsOptions } from './utils/createUtilityFunctions';
|
|
4
|
+
import { createUtilityFunctions } from './utils/createUtilityFunctions';
|
|
7
5
|
|
|
8
6
|
export function createTRPCQueryUtils<TRouter extends AnyRouter>(
|
|
9
7
|
opts: CreateQueryUtilsOptions<TRouter>,
|
package/src/createTRPCReact.tsx
CHANGED
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
-
import {
|
|
1
|
+
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
+
import type {
|
|
3
3
|
AnyMutationProcedure,
|
|
4
4
|
AnyProcedure,
|
|
5
5
|
AnyQueryProcedure,
|
|
6
6
|
AnyRootConfig,
|
|
7
7
|
AnyRouter,
|
|
8
8
|
AnySubscriptionProcedure,
|
|
9
|
-
createFlatProxy,
|
|
10
9
|
inferProcedureInput,
|
|
11
10
|
inferTransformedProcedureOutput,
|
|
12
11
|
inferTransformedSubscriptionOutput,
|
|
13
12
|
ProcedureRouterRecord,
|
|
14
13
|
ProtectedIntersection,
|
|
15
14
|
} from '@trpc/core';
|
|
15
|
+
import { createFlatProxy } from '@trpc/core';
|
|
16
16
|
import { useMemo } from 'react';
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './shared';
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} from './shared/hooks/createHooksInternal';
|
|
27
|
-
import {
|
|
17
|
+
import type {
|
|
18
|
+
TRPCUseQueries,
|
|
19
|
+
TRPCUseSuspenseQueries,
|
|
20
|
+
} from './internals/useQueries';
|
|
21
|
+
import type { CreateReactUtils } from './shared';
|
|
22
|
+
import { createReactDecoration, createReactQueryUtils } from './shared';
|
|
23
|
+
import type { CreateReactQueryHooks } from './shared/hooks/createHooksInternal';
|
|
24
|
+
import { createRootHooks } from './shared/hooks/createHooksInternal';
|
|
25
|
+
import type {
|
|
28
26
|
CreateClient,
|
|
29
27
|
DefinedUseTRPCQueryOptions,
|
|
30
28
|
DefinedUseTRPCQueryResult,
|
|
@@ -42,7 +40,7 @@ import {
|
|
|
42
40
|
UseTRPCSuspenseQueryOptions,
|
|
43
41
|
UseTRPCSuspenseQueryResult,
|
|
44
42
|
} from './shared/hooks/types';
|
|
45
|
-
import { CreateTRPCReactOptions } from './shared/types';
|
|
43
|
+
import type { CreateTRPCReactOptions } from './shared/types';
|
|
46
44
|
|
|
47
45
|
/**
|
|
48
46
|
* @internal
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
CancelOptions,
|
|
3
3
|
FetchInfiniteQueryOptions,
|
|
4
4
|
FetchQueryOptions,
|
|
@@ -13,17 +13,16 @@ import {
|
|
|
13
13
|
SetDataOptions,
|
|
14
14
|
Updater,
|
|
15
15
|
} from '@tanstack/react-query';
|
|
16
|
-
import {
|
|
16
|
+
import type {
|
|
17
17
|
CreateTRPCClient,
|
|
18
18
|
TRPCClientError,
|
|
19
19
|
TRPCRequestOptions,
|
|
20
20
|
TRPCUntypedClient,
|
|
21
21
|
} from '@trpc/client';
|
|
22
|
-
import type { AnyRouter } from '@trpc/core';
|
|
23
|
-
import { DistributiveOmit } from '@trpc/core';
|
|
22
|
+
import type { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
24
23
|
import { createContext } from 'react';
|
|
25
|
-
import { ExtractCursorType } from '../shared';
|
|
26
|
-
import { TRPCQueryKey } from './getQueryKey';
|
|
24
|
+
import type { ExtractCursorType } from '../shared';
|
|
25
|
+
import type { TRPCQueryKey } from './getQueryKey';
|
|
27
26
|
|
|
28
27
|
export type TRPCFetchQueryOptions<TOutput, TError> = DistributiveOmit<
|
|
29
28
|
FetchQueryOptions<TOutput, TError>,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyMutationProcedure,
|
|
3
3
|
AnyQueryProcedure,
|
|
4
4
|
AnyRootConfig,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
DeepPartial,
|
|
7
7
|
inferProcedureInput,
|
|
8
8
|
} from '@trpc/core';
|
|
9
|
-
import { DecoratedProcedureRecord, DecorateProcedure } from '../shared';
|
|
9
|
+
import type { DecoratedProcedureRecord, DecorateProcedure } from '../shared';
|
|
10
10
|
|
|
11
11
|
export type QueryType = 'any' | 'infinite' | 'query';
|
|
12
12
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
QueryKey,
|
|
3
3
|
UseQueryOptions,
|
|
4
4
|
UseSuspenseQueryOptions,
|
|
5
5
|
UseSuspenseQueryResult,
|
|
6
6
|
} from '@tanstack/react-query';
|
|
7
|
-
import { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
8
|
-
import {
|
|
7
|
+
import type { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
8
|
+
import type {
|
|
9
9
|
UseQueriesProcedureRecord,
|
|
10
10
|
UseSuspenseQueriesProcedureRecord,
|
|
11
11
|
UseTRPCQueryOptions,
|
package/src/server/ssgProxy.ts
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dehydrate,
|
|
1
|
+
import type {
|
|
3
2
|
DehydratedState,
|
|
4
3
|
DehydrateOptions,
|
|
5
4
|
InfiniteData,
|
|
6
5
|
QueryClient,
|
|
7
6
|
} from '@tanstack/react-query';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
TRPCUntypedClient,
|
|
13
|
-
} from '@trpc/client';
|
|
14
|
-
import {
|
|
7
|
+
import { dehydrate } from '@tanstack/react-query';
|
|
8
|
+
import type { inferRouterClient, TRPCClientError } from '@trpc/client';
|
|
9
|
+
import { getUntypedClient, TRPCUntypedClient } from '@trpc/client';
|
|
10
|
+
import type {
|
|
15
11
|
AnyProcedure,
|
|
16
12
|
AnyQueryProcedure,
|
|
17
13
|
AnyRootConfig,
|
|
18
14
|
AnyRouter,
|
|
19
|
-
callProcedure,
|
|
20
|
-
createFlatProxy,
|
|
21
|
-
createRecursiveProxy,
|
|
22
15
|
DataTransformerOptions,
|
|
23
16
|
Filter,
|
|
24
17
|
inferProcedureInput,
|
|
@@ -27,15 +20,19 @@ import {
|
|
|
27
20
|
Maybe,
|
|
28
21
|
ProtectedIntersection,
|
|
29
22
|
} from '@trpc/core';
|
|
30
|
-
import { getQueryKeyInternal } from '../internals/getQueryKey';
|
|
31
23
|
import {
|
|
24
|
+
callProcedure,
|
|
25
|
+
createFlatProxy,
|
|
26
|
+
createRecursiveProxy,
|
|
27
|
+
} from '@trpc/core';
|
|
28
|
+
import { getQueryKeyInternal } from '../internals/getQueryKey';
|
|
29
|
+
import type {
|
|
32
30
|
CreateTRPCReactQueryClientConfig,
|
|
33
31
|
ExtractCursorType,
|
|
34
|
-
getQueryClient,
|
|
35
|
-
getQueryType,
|
|
36
32
|
TRPCFetchInfiniteQueryOptions,
|
|
37
33
|
TRPCFetchQueryOptions,
|
|
38
34
|
} from '../shared';
|
|
35
|
+
import { getQueryClient, getQueryType } from '../shared';
|
|
39
36
|
|
|
40
37
|
interface CreateSSGHelpersInternal<TRouter extends AnyRouter> {
|
|
41
38
|
router: TRouter;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DehydratedState } from '@tanstack/react-query';
|
|
1
2
|
import {
|
|
2
3
|
useInfiniteQuery as __useInfiniteQuery,
|
|
3
4
|
useMutation as __useMutation,
|
|
@@ -6,29 +7,27 @@ import {
|
|
|
6
7
|
useSuspenseInfiniteQuery as __useSuspenseInfiniteQuery,
|
|
7
8
|
useSuspenseQueries as __useSuspenseQueries,
|
|
8
9
|
useSuspenseQuery as __useSuspenseQuery,
|
|
9
|
-
DehydratedState,
|
|
10
10
|
hashKey,
|
|
11
11
|
useQueryClient,
|
|
12
12
|
} from '@tanstack/react-query';
|
|
13
|
-
import {
|
|
13
|
+
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
14
|
+
import { createTRPCUntypedClient } from '@trpc/client';
|
|
14
15
|
import type { AnyRouter } from '@trpc/core';
|
|
15
16
|
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
TRPCContext,
|
|
19
|
-
TRPCContextState,
|
|
20
|
-
} from '../../internals/context';
|
|
17
|
+
import type { SSRState, TRPCContextState } from '../../internals/context';
|
|
18
|
+
import { TRPCContext } from '../../internals/context';
|
|
21
19
|
import { getClientArgs } from '../../internals/getClientArgs';
|
|
22
|
-
import {
|
|
20
|
+
import type { TRPCQueryKey } from '../../internals/getQueryKey';
|
|
21
|
+
import { getQueryKeyInternal } from '../../internals/getQueryKey';
|
|
23
22
|
import { useHookResult } from '../../internals/useHookResult';
|
|
24
|
-
import {
|
|
23
|
+
import type {
|
|
25
24
|
TRPCUseQueries,
|
|
26
25
|
TRPCUseSuspenseQueries,
|
|
27
26
|
} from '../../internals/useQueries';
|
|
28
27
|
import { createUtilityFunctions } from '../../utils/createUtilityFunctions';
|
|
29
28
|
import { createUseQueries } from '../proxy/useQueriesProxy';
|
|
30
|
-
import { CreateTRPCReactOptions, UseMutationOverride } from '../types';
|
|
31
|
-
import {
|
|
29
|
+
import type { CreateTRPCReactOptions, UseMutationOverride } from '../types';
|
|
30
|
+
import type {
|
|
32
31
|
CreateClient,
|
|
33
32
|
TRPCProvider,
|
|
34
33
|
TRPCQueryOptions,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
DefinedUseQueryResult,
|
|
3
3
|
DehydratedState,
|
|
4
4
|
InfiniteData,
|
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
UseSuspenseQueryOptions,
|
|
18
18
|
UseSuspenseQueryResult,
|
|
19
19
|
} from '@tanstack/react-query';
|
|
20
|
-
import {
|
|
20
|
+
import type {
|
|
21
21
|
CreateTRPCClientOptions,
|
|
22
22
|
TRPCRequestOptions,
|
|
23
23
|
TRPCUntypedClient,
|
|
24
24
|
} from '@trpc/client';
|
|
25
|
-
import { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
26
|
-
import { ReactNode } from 'react';
|
|
27
|
-
import { TRPCContextProps } from '../../internals/context';
|
|
28
|
-
import { TRPCQueryKey } from '../../internals/getQueryKey';
|
|
29
|
-
import { TRPCHookResult } from '../../internals/useHookResult';
|
|
25
|
+
import type { AnyRouter, DistributiveOmit } from '@trpc/core';
|
|
26
|
+
import type { ReactNode } from 'react';
|
|
27
|
+
import type { TRPCContextProps } from '../../internals/context';
|
|
28
|
+
import type { TRPCQueryKey } from '../../internals/getQueryKey';
|
|
29
|
+
import type { TRPCHookResult } from '../../internals/useHookResult';
|
|
30
30
|
|
|
31
31
|
export type OutputWithCursor<TData, TCursor = any> = {
|
|
32
32
|
cursor: TCursor | null;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyProcedure,
|
|
3
3
|
AnyRootConfig,
|
|
4
4
|
inferProcedureInput,
|
|
5
5
|
inferTransformedProcedureOutput,
|
|
6
6
|
} from '@trpc/core';
|
|
7
|
-
import {
|
|
7
|
+
import type {
|
|
8
8
|
InferMutationOptions,
|
|
9
9
|
InferMutationResult,
|
|
10
10
|
} from '../../utils/inferReactQueryProcedure';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyProcedure,
|
|
3
3
|
AnyRootConfig,
|
|
4
4
|
inferProcedureInput,
|
|
5
5
|
inferTransformedProcedureOutput,
|
|
6
6
|
} from '@trpc/core';
|
|
7
|
-
import {
|
|
7
|
+
import type {
|
|
8
8
|
InferQueryOptions,
|
|
9
9
|
InferQueryResult,
|
|
10
10
|
} from '../../utils/inferReactQueryProcedure';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyMutationProcedure,
|
|
3
3
|
AnyProcedure,
|
|
4
4
|
AnyQueryProcedure,
|
|
5
5
|
AnyRootConfig,
|
|
6
6
|
AnyRouter,
|
|
7
7
|
} from '@trpc/core';
|
|
8
|
-
import { MutationLike } from './mutationLike';
|
|
9
|
-
import { QueryLike } from './queryLike';
|
|
8
|
+
import type { MutationLike } from './mutationLike';
|
|
9
|
+
import type { QueryLike } from './queryLike';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Use to describe a route path which matches a given route's interface
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import { DecoratedProcedureUtilsRecord } from '../proxy/utilsProxy';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
|
+
import type { DecoratedProcedureUtilsRecord } from '../proxy/utilsProxy';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Use to describe a Utils/Context path which matches the given route's interface
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AnyRouter
|
|
2
|
-
import {
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
|
+
import { createRecursiveProxy } from '@trpc/core';
|
|
3
|
+
import type { CreateReactQueryHooks } from '../hooks/createHooksInternal';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Create proxy for decorating procedures
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { QueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { TRPCClientError, TRPCUntypedClient } from '@trpc/client';
|
|
3
|
-
import {
|
|
1
|
+
import type { QueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { TRPCClientError, TRPCUntypedClient } from '@trpc/client';
|
|
3
|
+
import type {
|
|
4
4
|
AnyProcedure,
|
|
5
5
|
AnyQueryProcedure,
|
|
6
6
|
AnyRootConfig,
|
|
7
7
|
AnyRouter,
|
|
8
|
-
createRecursiveProxy,
|
|
9
8
|
Filter,
|
|
10
9
|
inferProcedureInput,
|
|
11
10
|
inferTransformedProcedureOutput,
|
|
12
11
|
} from '@trpc/core';
|
|
12
|
+
import { createRecursiveProxy } from '@trpc/core';
|
|
13
13
|
import { getQueryKeyInternal } from '../../internals/getQueryKey';
|
|
14
|
-
import {
|
|
14
|
+
import type {
|
|
15
15
|
TrpcQueryOptionsForUseQueries,
|
|
16
16
|
TrpcQueryOptionsForUseSuspenseQueries,
|
|
17
17
|
} from '../../internals/useQueries';
|
|
18
|
-
import { TRPCUseQueryBaseOptions } from '../hooks/types';
|
|
18
|
+
import type { TRPCUseQueryBaseOptions } from '../hooks/types';
|
|
19
19
|
|
|
20
20
|
type GetQueryOptions<
|
|
21
21
|
TConfig extends AnyRootConfig,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
CancelOptions,
|
|
3
3
|
InfiniteData,
|
|
4
4
|
InvalidateOptions,
|
|
@@ -10,33 +10,30 @@ import {
|
|
|
10
10
|
SetDataOptions,
|
|
11
11
|
Updater,
|
|
12
12
|
} from '@tanstack/react-query';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
13
|
+
import type { TRPCClientError } from '@trpc/client';
|
|
14
|
+
import { createTRPCClientProxy } from '@trpc/client';
|
|
15
|
+
import type {
|
|
15
16
|
AnyQueryProcedure,
|
|
16
17
|
AnyRootConfig,
|
|
17
18
|
AnyRouter,
|
|
18
|
-
createFlatProxy,
|
|
19
|
-
createRecursiveProxy,
|
|
20
19
|
DeepPartial,
|
|
21
20
|
Filter,
|
|
22
21
|
inferProcedureInput,
|
|
23
22
|
inferTransformedProcedureOutput,
|
|
24
23
|
ProtectedIntersection,
|
|
25
24
|
} from '@trpc/core';
|
|
26
|
-
import {
|
|
27
|
-
|
|
25
|
+
import { createFlatProxy, createRecursiveProxy } from '@trpc/core';
|
|
26
|
+
import type {
|
|
28
27
|
DecoratedTRPCContextProps,
|
|
29
28
|
TRPCContextState,
|
|
30
29
|
TRPCFetchInfiniteQueryOptions,
|
|
31
30
|
TRPCFetchQueryOptions,
|
|
32
31
|
TRPCQueryUtils,
|
|
33
32
|
} from '../../internals/context';
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} from '../../internals/getQueryKey';
|
|
39
|
-
import { ExtractCursorType } from '../hooks/types';
|
|
33
|
+
import { contextProps } from '../../internals/context';
|
|
34
|
+
import type { QueryKeyKnown, QueryType } from '../../internals/getQueryKey';
|
|
35
|
+
import { getQueryKeyInternal } from '../../internals/getQueryKey';
|
|
36
|
+
import type { ExtractCursorType } from '../hooks/types';
|
|
40
37
|
|
|
41
38
|
type DecorateProcedure<
|
|
42
39
|
TConfig extends AnyRootConfig,
|
package/src/shared/types.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TRPCUntypedClient,
|
|
6
|
-
} from '@trpc/client';
|
|
7
|
-
import { AnyRouter } from '@trpc/core';
|
|
1
|
+
import type { QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import type { CreateTRPCClient } from '@trpc/client';
|
|
3
|
+
import { getUntypedClient, TRPCUntypedClient } from '@trpc/client';
|
|
4
|
+
import type { AnyRouter } from '@trpc/core';
|
|
8
5
|
import { getClientArgs } from '../internals/getClientArgs';
|
|
9
|
-
import { TRPCQueryUtils } from '../shared';
|
|
6
|
+
import type { TRPCQueryUtils } from '../shared';
|
|
10
7
|
|
|
11
8
|
export interface CreateQueryUtilsOptions<TRouter extends AnyRouter> {
|
|
12
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
-
import {
|
|
1
|
+
import type { TRPCClientErrorLike } from '@trpc/client';
|
|
2
|
+
import type {
|
|
3
3
|
AnyMutationProcedure,
|
|
4
4
|
AnyProcedure,
|
|
5
5
|
AnyQueryProcedure,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
inferProcedureInput,
|
|
9
9
|
inferTransformedProcedureOutput,
|
|
10
10
|
} from '@trpc/core';
|
|
11
|
-
import {
|
|
11
|
+
import type {
|
|
12
12
|
UseTRPCMutationOptions,
|
|
13
13
|
UseTRPCMutationResult,
|
|
14
14
|
UseTRPCQueryOptions,
|