From a7f647d84a607357f323d66848c9ead001b32615 Mon Sep 17 00:00:00 2001 From: wobsoriano Date: Mon, 12 Aug 2024 07:49:44 -0700 Subject: [PATCH] chore: add trpc request options type --- src/client/createTRPCNuxtClient.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/createTRPCNuxtClient.ts b/src/client/createTRPCNuxtClient.ts index c6368b0..99ff9db 100644 --- a/src/client/createTRPCNuxtClient.ts +++ b/src/client/createTRPCNuxtClient.ts @@ -5,7 +5,7 @@ import type { AsyncData, AsyncDataOptions } from 'nuxt/app' import type { AnyRootTypes, ProcedureOptions, RouterRecord } from '@trpc/server/unstable-core-do-not-import' import type { MaybeRefOrGetter, UnwrapRef } from 'vue' -import type { TRPCSubscriptionObserver } from '@trpc/client/dist/internals/TRPCUntypedClient' +import type { TRPCRequestOptions, TRPCSubscriptionObserver } from '@trpc/client/dist/internals/TRPCUntypedClient' import type { Unsubscribable } from '@trpc/server/observable' import { createNuxtProxyDecoration } from './decorationProxy' @@ -86,6 +86,7 @@ export type DecoratedQuery = { */ queryKey?: string watch?: AsyncDataOptions['watch'] | false + trpc?: TRPCRequestOptions } ) => AsyncData | null, TRPCClientErrorLike> query: Resolver @@ -109,6 +110,7 @@ export type DecoratedMutation = { * The function to call to trigger the mutation. */ mutate: (input: TDef['output']) => Promise | null, TRPCClientErrorLike>['data']>> + trpc?: TRPCRequestOptions } mutate: Resolver }