@orpc/server
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -0,3 +1,3 @@ | ||
import type { ContractProcedure, ContractRouter, SchemaInput, SchemaOutput } from '@orpc/contract'; | ||
import type { Context } from './types'; | ||
import { type ContractProcedure, type ContractRouter } from '@orpc/contract'; | ||
import { type DecoratedProcedure, type Procedure } from './procedure'; | ||
@@ -14,2 +14,8 @@ export interface Router<TContext extends Context> { | ||
export declare function toContractRouter(router: ContractRouter | Router<any>): ContractRouter; | ||
export type InferRouterInputs<T extends Router<any>> = { | ||
[K in keyof T]: T[K] extends Procedure<any, any, infer UInputSchema, any, any> ? SchemaInput<UInputSchema> : T[K] extends Router<any> ? InferRouterInputs<T[K]> : never; | ||
}; | ||
export type InferRouterOutputs<T extends Router<any>> = { | ||
[K in keyof T]: T[K] extends Procedure<any, any, any, infer UOutputSchema, infer UHandlerOutput> ? SchemaOutput<UOutputSchema, UHandlerOutput> : T[K] extends Router<any> ? InferRouterOutputs<T[K]> : never; | ||
}; | ||
//# sourceMappingURL=router.d.ts.map |
{ | ||
"name": "@orpc/server", | ||
"type": "module", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"author": { | ||
@@ -11,7 +11,7 @@ "name": "unnoq", | ||
"license": "MIT", | ||
"homepage": "https://github.com/unnoq/unnoq", | ||
"homepage": "https://github.com/unnoq/orpc", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/unnoq/unnoq.git", | ||
"directory": "examples/typescript-vite-package" | ||
"url": "https://github.com/unnoq/orpc.git", | ||
"directory": "packages/server" | ||
}, | ||
@@ -48,3 +48,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@orpc/contract": "0.0.4", | ||
"@orpc/contract": "0.1.0", | ||
"@orpc/shared": "0.0.5", | ||
@@ -51,0 +51,0 @@ "@orpc/transformer": "0.0.4" |
@@ -0,5 +1,9 @@ | ||
import type { | ||
ContractProcedure, | ||
ContractRouter, | ||
SchemaInput, | ||
SchemaOutput, | ||
} from '@orpc/contract' | ||
import type { Context } from './types' | ||
import { | ||
type ContractProcedure, | ||
type ContractRouter, | ||
isContractProcedure, | ||
@@ -72,1 +76,17 @@ } from '@orpc/contract' | ||
} | ||
export type InferRouterInputs<T extends Router<any>> = { | ||
[K in keyof T]: T[K] extends Procedure<any, any, infer UInputSchema, any, any> | ||
? SchemaInput<UInputSchema> | ||
: T[K] extends Router<any> | ||
? InferRouterInputs<T[K]> | ||
: never | ||
} | ||
export type InferRouterOutputs<T extends Router<any>> = { | ||
[K in keyof T]: T[K] extends Procedure<any, any, any, infer UOutputSchema, infer UHandlerOutput> | ||
? SchemaOutput<UOutputSchema, UHandlerOutput> | ||
: T[K] extends Router<any> | ||
? InferRouterOutputs<T[K]> | ||
: never | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
362753
65
5580
+ Added@orpc/contract@0.1.0(transitive)
- Removed@orpc/contract@0.0.4(transitive)
Updated@orpc/contract@0.1.0