@trpc/tanstack-react-query 11.18.1-canary.19 → 11.18.1-canary.30

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.
@@ -33,7 +33,9 @@ interface TRPCSubscriptionOptionsOut<
33
33
  TOutput,
34
34
  TError,
35
35
  TFeatureFlags extends FeatureFlags,
36
- > extends UnusedSkipTokenTRPCSubscriptionOptionsIn<TOutput, TError>,
36
+ >
37
+ extends
38
+ UnusedSkipTokenTRPCSubscriptionOptionsIn<TOutput, TError>,
37
39
  TRPCQueryOptionsResult {
38
40
  enabled: boolean;
39
41
  queryKey: TRPCQueryKey<TFeatureFlags['keyPrefix']>;
@@ -70,10 +72,7 @@ export interface TRPCSubscriptionOptions<
70
72
  >;
71
73
  }
72
74
  export type TRPCSubscriptionStatus =
73
- | 'idle'
74
- | 'connecting'
75
- | 'pending'
76
- | 'error';
75
+ 'idle' | 'connecting' | 'pending' | 'error';
77
76
 
78
77
  export interface TRPCSubscriptionBaseResult<TOutput, TError> {
79
78
  status: TRPCSubscriptionStatus;
@@ -85,29 +84,35 @@ export interface TRPCSubscriptionBaseResult<TOutput, TError> {
85
84
  reset: () => void;
86
85
  }
87
86
 
88
- export interface TRPCSubscriptionIdleResult<TOutput>
89
- extends TRPCSubscriptionBaseResult<TOutput, null> {
87
+ export interface TRPCSubscriptionIdleResult<
88
+ TOutput,
89
+ > extends TRPCSubscriptionBaseResult<TOutput, null> {
90
90
  status: 'idle';
91
91
  data: undefined;
92
92
  error: null;
93
93
  }
94
94
 
95
- export interface TRPCSubscriptionConnectingResult<TOutput, TError>
96
- extends TRPCSubscriptionBaseResult<TOutput, TError> {
95
+ export interface TRPCSubscriptionConnectingResult<
96
+ TOutput,
97
+ TError,
98
+ > extends TRPCSubscriptionBaseResult<TOutput, TError> {
97
99
  status: 'connecting';
98
100
  data: undefined | TOutput;
99
101
  error: TError | null;
100
102
  }
101
103
 
102
- export interface TRPCSubscriptionPendingResult<TOutput>
103
- extends TRPCSubscriptionBaseResult<TOutput, undefined> {
104
+ export interface TRPCSubscriptionPendingResult<
105
+ TOutput,
106
+ > extends TRPCSubscriptionBaseResult<TOutput, undefined> {
104
107
  status: 'pending';
105
108
  data: TOutput | undefined;
106
109
  error: null;
107
110
  }
108
111
 
109
- export interface TRPCSubscriptionErrorResult<TOutput, TError>
110
- extends TRPCSubscriptionBaseResult<TOutput, TError> {
112
+ export interface TRPCSubscriptionErrorResult<
113
+ TOutput,
114
+ TError,
115
+ > extends TRPCSubscriptionBaseResult<TOutput, TError> {
111
116
  status: 'error';
112
117
  data: TOutput | undefined;
113
118
  error: TError;
@@ -150,7 +155,7 @@ export const trpcSubscriptionOptions = <
150
155
  >['subscribe'] = (innerOpts) => {
151
156
  return subscribe(
152
157
  path.join('.'),
153
- input === skipToken ? undefined : (input as any),
158
+ input === skipToken ? undefined : input,
154
159
  innerOpts,
155
160
  );
156
161
  };
@@ -245,7 +250,6 @@ export function useSubscription<TOutput, TError>(
245
250
  currentSubscriptionRef.current = () => {
246
251
  subscription.unsubscribe();
247
252
  };
248
- // eslint-disable-next-line react-hooks/react-compiler
249
253
  // eslint-disable-next-line react-hooks/exhaustive-deps
250
254
  }, [hashKey(opts.queryKey), opts.enabled]);
251
255
 
@@ -103,8 +103,7 @@ export type TRPCQueryKey<TPrefixEnabled extends boolean = false> =
103
103
  : TRPCQueryKeyWithoutPrefix;
104
104
 
105
105
  export type AnyTRPCQueryKey =
106
- | TRPCQueryKeyWithoutPrefix
107
- | TRPCQueryKeyWithPrefix;
106
+ TRPCQueryKeyWithoutPrefix | TRPCQueryKeyWithPrefix;
108
107
 
109
108
  /**
110
109
  * @public
@@ -120,8 +119,7 @@ export type TRPCMutationKeyWithPrefix = [
120
119
  export type TRPCMutationKeyWithoutPrefix = [path: string[]];
121
120
 
122
121
  export type AnyTRPCMutationKey =
123
- | TRPCMutationKeyWithoutPrefix
124
- | TRPCMutationKeyWithPrefix;
122
+ TRPCMutationKeyWithoutPrefix | TRPCMutationKeyWithPrefix;
125
123
 
126
124
  /**
127
125
  * @public