@trpc/react-query 10.45.1-canary.2 → 10.45.1-canary.20
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/README.md +4 -4
- package/dist/bundle-analysis.json +26 -26
- package/dist/{createHooksInternal-37b068e0.js → createHooksInternal-8935d801.js} +0 -2
- package/dist/createTRPCReact.d.ts +10 -10
- package/dist/createTRPCReact.d.ts.map +1 -1
- package/dist/internals/context.d.ts +4 -5
- package/dist/internals/context.d.ts.map +1 -1
- package/dist/internals/getArrayQueryKey.d.ts +1 -1
- package/dist/internals/getArrayQueryKey.d.ts.map +1 -1
- package/dist/internals/getQueryKey.d.ts +3 -3
- 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/interop.d.ts +4 -4
- package/dist/interop.d.ts.map +1 -1
- package/dist/server/ssgProxy.d.ts +4 -4
- package/dist/server/ssgProxy.d.ts.map +1 -1
- package/dist/server/types.d.ts +3 -3
- package/dist/server/types.d.ts.map +1 -1
- package/dist/shared/hooks/createHooksInternal.d.ts +6 -6
- package/dist/shared/hooks/createHooksInternal.d.ts.map +1 -1
- package/dist/shared/hooks/deprecated/createHooksInternal.d.ts +7 -7
- package/dist/shared/hooks/deprecated/createHooksInternal.d.ts.map +1 -1
- package/dist/shared/hooks/types.d.ts +6 -6
- package/dist/shared/hooks/types.d.ts.map +1 -1
- package/dist/shared/polymorphism/mutationLike.d.ts +3 -3
- package/dist/shared/polymorphism/mutationLike.d.ts.map +1 -1
- package/dist/shared/polymorphism/queryLike.d.ts +3 -3
- 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 +4 -4
- 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/ssg/ssg.d.ts +3 -3
- package/dist/ssg/ssg.d.ts.map +1 -1
- package/dist/utils/inferReactQueryProcedure.d.ts +4 -4
- package/dist/utils/inferReactQueryProcedure.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/createTRPCReact.tsx +12 -14
- package/src/internals/context.tsx +8 -5
- package/src/internals/getArrayQueryKey.ts +1 -1
- package/src/internals/getQueryKey.ts +4 -3
- package/src/internals/useQueries.ts +3 -3
- package/src/interop.ts +6 -7
- package/src/server/ssgProxy.ts +5 -8
- package/src/server/types.ts +3 -3
- package/src/shared/hooks/createHooksInternal.tsx +11 -12
- package/src/shared/hooks/deprecated/createHooksInternal.tsx +12 -16
- package/src/shared/hooks/types.ts +6 -6
- package/src/shared/polymorphism/mutationLike.ts +3 -3
- package/src/shared/polymorphism/queryLike.ts +3 -3
- package/src/shared/polymorphism/routerLike.ts +3 -3
- package/src/shared/polymorphism/utilsLike.ts +2 -2
- package/src/shared/proxy/decorationProxy.ts +2 -2
- package/src/shared/proxy/useQueriesProxy.ts +7 -9
- package/src/shared/proxy/utilsProxy.ts +9 -11
- package/src/shared/queryClient.ts +2 -1
- package/src/shared/types.ts +2 -2
- package/src/ssg/ssg.ts +5 -5
- package/src/utils/inferReactQueryProcedure.ts +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
CancelOptions,
|
|
3
3
|
InfiniteData,
|
|
4
4
|
InvalidateOptions,
|
|
@@ -10,8 +10,9 @@ 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
|
AnyRouter,
|
|
17
18
|
DeepPartial,
|
|
@@ -19,19 +20,16 @@ import {
|
|
|
19
20
|
inferProcedureInput,
|
|
20
21
|
ProtectedIntersection,
|
|
21
22
|
} from '@trpc/server';
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
inferTransformedProcedureOutput,
|
|
26
|
-
} from '@trpc/server/shared';
|
|
27
|
-
import {
|
|
28
|
-
contextProps,
|
|
23
|
+
import type { inferTransformedProcedureOutput } from '@trpc/server/shared';
|
|
24
|
+
import { createFlatProxy, createRecursiveProxy } from '@trpc/server/shared';
|
|
25
|
+
import type {
|
|
29
26
|
DecoratedProxyTRPCContextProps,
|
|
30
27
|
TRPCContextState,
|
|
31
28
|
TRPCFetchInfiniteQueryOptions,
|
|
32
29
|
TRPCFetchQueryOptions,
|
|
33
30
|
} from '../../internals/context';
|
|
34
|
-
import {
|
|
31
|
+
import { contextProps } from '../../internals/context';
|
|
32
|
+
import type { QueryKeyKnown } from '../../internals/getArrayQueryKey';
|
|
35
33
|
import { getQueryKeyInternal } from '../../internals/getQueryKey';
|
|
36
34
|
|
|
37
35
|
type DecorateProcedure<TProcedure extends AnyQueryProcedure> = {
|
package/src/shared/types.ts
CHANGED
package/src/ssg/ssg.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dehydrate,
|
|
1
|
+
import type {
|
|
3
2
|
DehydratedState,
|
|
4
3
|
DehydrateOptions,
|
|
5
4
|
InfiniteData,
|
|
6
5
|
} from '@tanstack/react-query';
|
|
6
|
+
import { dehydrate } from '@tanstack/react-query';
|
|
7
7
|
import { getUntypedClient, TRPCUntypedClient } from '@trpc/client';
|
|
8
|
-
import {
|
|
8
|
+
import type {
|
|
9
9
|
AnyRouter,
|
|
10
|
-
callProcedure,
|
|
11
10
|
inferHandlerInput,
|
|
12
11
|
inferProcedureOutput,
|
|
13
12
|
} from '@trpc/server';
|
|
13
|
+
import { callProcedure } from '@trpc/server';
|
|
14
14
|
import { getArrayQueryKey } from '../internals/getArrayQueryKey';
|
|
15
|
-
import { CreateServerSideHelpersOptions } from '../server/types';
|
|
15
|
+
import type { CreateServerSideHelpersOptions } from '../server/types';
|
|
16
16
|
import { getQueryClient } from '../shared';
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
AnyRouter,
|
|
7
7
|
inferProcedureInput,
|
|
8
8
|
} from '@trpc/server';
|
|
9
|
-
import { inferTransformedProcedureOutput } from '@trpc/server/shared';
|
|
10
|
-
import {
|
|
9
|
+
import type { inferTransformedProcedureOutput } from '@trpc/server/shared';
|
|
10
|
+
import type {
|
|
11
11
|
UseTRPCMutationOptions,
|
|
12
12
|
UseTRPCMutationResult,
|
|
13
13
|
UseTRPCQueryOptions,
|