Skip to content

Commit

Permalink
chore: reuse existing AppRouter type (#1687)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinasab committed Dec 6, 2023
1 parent 9eac8f5 commit 6461090
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/tasty-pandas-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-t3-app": patch
---

chore: reuse existing AppRouter type #1687
4 changes: 2 additions & 2 deletions cli/template/extras/src/trpc/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { type TRPCErrorResponse } from "@trpc/server/rpc";
import { cookies } from "next/headers";
import { cache } from "react";

import { appRouter } from "~/server/api/root";
import { appRouter, type AppRouter } from "~/server/api/root";
import { createTRPCContext } from "~/server/api/trpc";
import { transformer } from "./shared";

Expand All @@ -28,7 +28,7 @@ const createContext = cache(() => {
});
});

export const api = createTRPCProxyClient<typeof appRouter>({
export const api = createTRPCProxyClient<AppRouter>({
transformer,
links: [
loggerLink({
Expand Down

0 comments on commit 6461090

Please sign in to comment.