tRPC query has any type

I'm using turbo repo for trpc (with express) and react-native, I made mutation query, but in client side when I try to use trpc it has any type on queries @/api/auth
export const auth = publicProcedure
.input(
z.object({
token: z.string(),
provider: z.enum(["google", "apple", "spotify"]),
})
)
// ...
export const auth = publicProcedure
.input(
z.object({
token: z.string(),
provider: z.enum(["google", "apple", "spotify"]),
})
)
// ...
server.ts
import { createTRPCRouter } from ".";
import { auth } from "@/api/auth";

export const appRouter = createTRPCRouter({ auth });

export type AppRouter = typeof appRouter;
import { createTRPCRouter } from ".";
import { auth } from "@/api/auth";

export const appRouter = createTRPCRouter({ auth });

export type AppRouter = typeof appRouter;
and from index.ts I export AppRouter type client.ts
import { createTRPCReact } from '@trpc/react-query'
import type { AppRouter } from 'backend'

export const api = createTRPCReact<AppRouter>()
import { createTRPCReact } from '@trpc/react-query'
import type { AppRouter } from 'backend'

export const api = createTRPCReact<AppRouter>()
so whenever I use api.auth auth type is any but why?? I don't get it I actually followed t3-app configuration of nextjs
5 Replies
yaviscoke
yaviscokeOP12mo ago
No description
yaviscoke
yaviscokeOP12mo ago
also this is my packages/backend package.json that I export types from index.ts
No description
yaviscoke
yaviscokeOP12mo ago
Sad found issue but idk how to fix it
yaviscoke
yaviscokeOP12mo ago
if I imort publicProcedure like that ../../
No description
yaviscoke
yaviscokeOP12mo ago
type checking works but if I do @/trpc it no longer works issue comes from tsconfig
Want results from more Discord servers?
Add your server