@@ -131,8 +131,8 @@ export function useComputeQuery<TInput, TOutput>(
131131 return useQuery < TOutput , Error > ( {
132132 queryKey : [ 'compute' , name , input ] as const ,
133133 queryFn : async ( ) => {
134- const result = await kit . run < TInput , TOutput > ( name , input , computeOptions ) ;
135- return result ;
134+ const result = await kit . run ( name , input as never , computeOptions ) ;
135+ return result as TOutput ;
136136 } ,
137137 ...queryOptions ,
138138 } ) ;
@@ -183,8 +183,8 @@ export function useComputeMutation<TInput, TOutput>(
183183
184184 return useMutation < TOutput , Error , TInput > ( {
185185 mutationFn : async ( input : TInput ) => {
186- const result = await kit . run < TInput , TOutput > ( name , input , computeOptions ) ;
187- return result ;
186+ const result = await kit . run ( name , input as never , computeOptions ) ;
187+ return result as TOutput ;
188188 } ,
189189 ...mutationOptions ,
190190 } ) ;
@@ -232,7 +232,10 @@ export function createComputeHooks(kit: ComputeKit) {
232232
233233 return useQuery < TOutput , Error > ( {
234234 queryKey : [ 'compute' , name , input ] as const ,
235- queryFn : async ( ) => kit . run < TInput , TOutput > ( name , input , computeOptions ) ,
235+ queryFn : async ( ) => {
236+ const result = await kit . run ( name , input as never , computeOptions ) ;
237+ return result as TOutput ;
238+ } ,
236239 ...queryOptions ,
237240 } ) ;
238241 } ,
@@ -249,8 +252,10 @@ export function createComputeHooks(kit: ComputeKit) {
249252 const { computeOptions, ...mutationOptions } = options ?? { } ;
250253
251254 return useMutation < TOutput , Error , TInput > ( {
252- mutationFn : async ( input : TInput ) =>
253- kit . run < TInput , TOutput > ( name , input , computeOptions ) ,
255+ mutationFn : async ( input : TInput ) => {
256+ const result = await kit . run ( name , input as never , computeOptions ) ;
257+ return result as TOutput ;
258+ } ,
254259 ...mutationOptions ,
255260 } ) ;
256261 } ,
0 commit comments