@@ -202,6 +202,19 @@ export type UseQuerySubscriptionOptions = SubscriptionOptions & {
202202 refetchOnMountOrArgChange ?: boolean | number
203203}
204204
205+ /**
206+ * Provides a way to reference the options accepted by the `useQuerySubscription`
207+ * hook in userland code.
208+ *
209+ * Unlike other `Typed*` wrappers, this type has no generic parameters since
210+ * {@linkcode UseQuerySubscriptionOptions} does not depend on a specific query
211+ * definition.
212+ *
213+ * @since 2.2.8
214+ * @public
215+ */
216+ export type TypedUseQuerySubscriptionOptions = UseQuerySubscriptionOptions
217+
205218/**
206219 * A React hook that automatically triggers fetches of data from an endpoint, and 'subscribes' the component to the cached data.
207220 *
@@ -1337,6 +1350,30 @@ export type UseMutationStateOptions<
13371350 fixedCacheKey ?: string
13381351}
13391352
1353+ /**
1354+ * Provides a way to define a "pre-typed" version of
1355+ * {@linkcode UseMutationStateOptions} with specific options for a given mutation.
1356+ *
1357+ * @template ResultType - The type of the result `data` returned by the mutation.
1358+ * @template QueryArg - The type of the argument passed into the mutation.
1359+ * @template BaseQuery - The type of the base query function being used.
1360+ * @template SelectedResult - The type of the selected result returned by the __`selectFromResult`__ function.
1361+ *
1362+ * @since 2.2.8
1363+ * @public
1364+ */
1365+ export type TypedUseMutationStateOptions <
1366+ ResultType ,
1367+ QueryArg ,
1368+ BaseQuery extends BaseQueryFn ,
1369+ SelectedResult extends Record < string , any > = MutationResultSelectorResult <
1370+ MutationDefinition < QueryArg , BaseQuery , string , ResultType , string >
1371+ > ,
1372+ > = UseMutationStateOptions <
1373+ MutationDefinition < QueryArg , BaseQuery , string , ResultType , string > ,
1374+ SelectedResult
1375+ >
1376+
13401377export type UseMutationStateResult <
13411378 D extends MutationDefinition < any , any , any , any > ,
13421379 R ,
0 commit comments