We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a055cad commit 6427660Copy full SHA for 6427660
1 file changed
packages/server/src/router.ts
@@ -82,15 +82,19 @@ export function toContractRouter(
82
}
83
84
export type InferRouterInputs<T extends Router<any>> = {
85
- [K in keyof T]: T[K] extends Procedure<any, any, infer UInputSchema, any, any>
+ [K in keyof T]: T[K] extends
86
+ | Procedure<any, any, infer UInputSchema, any, any>
87
+ | Lazy<Procedure<any, any, infer UInputSchema, any, any>>
88
? SchemaInput<UInputSchema>
89
: T[K] extends Router<any>
90
? InferRouterInputs<T[K]>
91
: never
92
93
94
export type InferRouterOutputs<T extends Router<any>> = {
- [K in keyof T]: T[K] extends Procedure<any, any, any, infer UOutputSchema, infer UFuncOutput>
95
96
+ | Procedure<any, any, any, infer UOutputSchema, infer UFuncOutput>
97
+ | Lazy<Procedure<any, any, any, infer UOutputSchema, infer UFuncOutput>>
98
? SchemaOutput<UOutputSchema, UFuncOutput>
99
100
? InferRouterOutputs<T[K]>
0 commit comments