From f8edd769f05db5801703051c13aa06a4a2b91bd3 Mon Sep 17 00:00:00 2001 From: Robert Soriano Date: Mon, 23 May 2022 11:06:51 -0700 Subject: [PATCH] fix: trpc client composable type --- src/runtime/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/client.ts b/src/runtime/client.ts index d56ac7d..bc53b61 100644 --- a/src/runtime/client.ts +++ b/src/runtime/client.ts @@ -6,7 +6,7 @@ import type { _Transform, } from 'nuxt/dist/app/composables/asyncData' import type { ProcedureRecord, inferHandlerInput, inferProcedureInput, inferProcedureOutput } from '@trpc/server' -import type { TRPCClientErrorLike } from '@trpc/client' +import type { TRPCClient, TRPCClientErrorLike } from '@trpc/client' import { objectHash } from 'ohash' import { useAsyncData, useNuxtApp, useState } from '#app' // @ts-expect-error: Resolved by Nuxt @@ -61,5 +61,5 @@ export async function useAsyncQuery< export function useClient() { const { $client } = useNuxtApp() - return $client + return $client as TRPCClient }