Skip to content

Commit 97752da

Browse files
authored
fix: TypeScript trpc types (#73)
This PR fix type errors reported in #51 closed #51
1 parent 6e68771 commit 97752da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

templates/react/file-router/src/routes/__root.tsx.ejs

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ import appCss from '../styles.css?url'
1111
<% } %><% if (addOnEnabled["tanstack-query"]) { %>
1212
import type { QueryClient } from '@tanstack/react-query'
1313
<% if (addOnEnabled.tRPC) { %>
14-
import { TRPCRouter } from '@/integrations/trpc/router'
14+
import type { TRPCRouter } from '@/integrations/trpc/router'
15+
import type { TRPCOptionsProxy } from '@trpc/tanstack-react-query'
1516
<% } %>
1617
1718
interface MyRouterContext {
1819
queryClient: QueryClient
1920
<% if (addOnEnabled.tRPC) { %>
20-
trpc: TRPCRouter
21+
trpc: TRPCOptionsProxy<TRPCRouter>
2122
<% } %>
2223
}<% } %>
2324

@@ -78,4 +79,4 @@ function RootDocument({ children }: { children: React.ReactNode }) {
7879
</html>
7980
)
8081
}
81-
<% } %>
82+
<% } %>

0 commit comments

Comments
 (0)