Skip to content

Commit d47620b

Browse files
chore: apply lint and formatting fixes
1 parent 109f2cd commit d47620b

File tree

1 file changed

+7
-9
lines changed
  • www/docs/client/tanstack-react-query

1 file changed

+7
-9
lines changed

www/docs/client/tanstack-react-query/usage.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -231,25 +231,23 @@ function SubscriptionExample() {
231231
When you need to infer the input and output types for a procedure or router, there are 2 options available depending on the situation
232232

233233
```ts
234-
import { AppRouter } from './path/to/server'
235-
236234
//
237235
// Infer the input and output types of a full router
238236

239237
import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
240-
241-
export type Inputs = inferRouterInputs<AppRouter>
242-
export type Outputs = inferRouterOutputs<AppRouter>
243-
244238
//
245239
// Infer types for a single procedure
246240

247241
import type { inferInput, inferOutput } from '@trpc/tanstack-react-query';
242+
import { AppRouter } from './path/to/server';
243+
244+
export type Inputs = inferRouterInputs<AppRouter>;
245+
export type Outputs = inferRouterOutputs<AppRouter>;
248246

249247
function Component() {
250-
const trpc = useTRPC()
248+
const trpc = useTRPC();
251249

252-
type Input = inferInput<typeof trpc.path.to.procedure>
253-
type Output = inferOutput<typeof trpc.path.to.procedure>
250+
type Input = inferInput<typeof trpc.path.to.procedure>;
251+
type Output = inferOutput<typeof trpc.path.to.procedure>;
254252
}
255253
```

0 commit comments

Comments
 (0)