Skip to content

Commit 633eb1c

Browse files
authored
refactor: use recommended patterns for import/export (#1434)
1 parent e6e5e2e commit 633eb1c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

apps/expo/src/utils/api.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ export const trpc = createTRPCOptionsProxy<AppRouter>({
4747
queryClient,
4848
});
4949

50-
export { type RouterInputs, type RouterOutputs } from "@acme/api";
50+
export type { RouterInputs, RouterOutputs } from "@acme/api";

packages/api/src/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
import type { inferRouterInputs, inferRouterOutputs } from "@trpc/server";
22

33
import type { AppRouter } from "./root";
4-
import { appRouter } from "./root";
5-
import { createTRPCContext } from "./trpc";
64

75
/**
86
* Inference helpers for input types
97
* @example
108
* type PostByIdInput = RouterInputs['post']['byId']
119
* ^? { id: number }
12-
**/
10+
*/
1311
type RouterInputs = inferRouterInputs<AppRouter>;
1412

1513
/**
1614
* Inference helpers for output types
1715
* @example
1816
* type AllPostsOutput = RouterOutputs['post']['all']
1917
* ^? Post[]
20-
**/
18+
*/
2119
type RouterOutputs = inferRouterOutputs<AppRouter>;
2220

23-
export { createTRPCContext, appRouter };
24-
export type { AppRouter, RouterInputs, RouterOutputs };
21+
export { type AppRouter, appRouter } from "./root";
22+
export { createTRPCContext } from "./trpc";
23+
export type { RouterInputs, RouterOutputs };

0 commit comments

Comments
 (0)