From 0b8fe9a042ef524580ac94a8ad44c50bfd60fe2e Mon Sep 17 00:00:00 2001 From: nirtamir2 Date: Thu, 27 Mar 2025 18:36:58 -0400 Subject: [PATCH 1/3] Fix TypeScript trpc types --- templates/react/file-router/src/routes/__root.tsx.ejs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/react/file-router/src/routes/__root.tsx.ejs b/templates/react/file-router/src/routes/__root.tsx.ejs index 5811b42..0f786d4 100644 --- a/templates/react/file-router/src/routes/__root.tsx.ejs +++ b/templates/react/file-router/src/routes/__root.tsx.ejs @@ -12,12 +12,13 @@ import appCss from '../styles.css?url' import type { QueryClient } from '@tanstack/react-query' <% if (addOnEnabled.tRPC) { %> import { TRPCRouter } from '@/integrations/trpc/router' +import { TRPCOptionsProxy } from "@trpc/tanstack-react-query"; <% } %> interface MyRouterContext { queryClient: QueryClient <% if (addOnEnabled.tRPC) { %> - trpc: TRPCRouter + trpc: TRPCOptionsProxy; <% } %> }<% } %> @@ -78,4 +79,4 @@ function RootDocument({ children }: { children: React.ReactNode }) { ) } -<% } %> \ No newline at end of file +<% } %> From 81dd1c4ce8f66676ce0c5ed55d3d1144045edc60 Mon Sep 17 00:00:00 2001 From: Nir Tamir Date: Fri, 28 Mar 2025 00:44:09 +0200 Subject: [PATCH 2/3] format --- templates/react/file-router/src/routes/__root.tsx.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/react/file-router/src/routes/__root.tsx.ejs b/templates/react/file-router/src/routes/__root.tsx.ejs index 0f786d4..e571d57 100644 --- a/templates/react/file-router/src/routes/__root.tsx.ejs +++ b/templates/react/file-router/src/routes/__root.tsx.ejs @@ -12,13 +12,13 @@ import appCss from '../styles.css?url' import type { QueryClient } from '@tanstack/react-query' <% if (addOnEnabled.tRPC) { %> import { TRPCRouter } from '@/integrations/trpc/router' -import { TRPCOptionsProxy } from "@trpc/tanstack-react-query"; +import { TRPCOptionsProxy } from "@trpc/tanstack-react-query" <% } %> interface MyRouterContext { queryClient: QueryClient <% if (addOnEnabled.tRPC) { %> - trpc: TRPCOptionsProxy; + trpc: TRPCOptionsProxy <% } %> }<% } %> From c43549ba85b711034adcb97cb6da4e57a0fd2b79 Mon Sep 17 00:00:00 2001 From: Nir Tamir Date: Fri, 28 Mar 2025 00:46:33 +0200 Subject: [PATCH 3/3] format --- templates/react/file-router/src/routes/__root.tsx.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/react/file-router/src/routes/__root.tsx.ejs b/templates/react/file-router/src/routes/__root.tsx.ejs index e571d57..8d2fca8 100644 --- a/templates/react/file-router/src/routes/__root.tsx.ejs +++ b/templates/react/file-router/src/routes/__root.tsx.ejs @@ -11,8 +11,8 @@ import appCss from '../styles.css?url' <% } %><% if (addOnEnabled["tanstack-query"]) { %> import type { QueryClient } from '@tanstack/react-query' <% if (addOnEnabled.tRPC) { %> -import { TRPCRouter } from '@/integrations/trpc/router' -import { TRPCOptionsProxy } from "@trpc/tanstack-react-query" +import type { TRPCRouter } from '@/integrations/trpc/router' +import type { TRPCOptionsProxy } from '@trpc/tanstack-react-query' <% } %> interface MyRouterContext {