@ts-rest/core
Advanced tools
Comparing version 3.39.1 to 3.39.2
# @ts-rest/core | ||
## 3.39.2 | ||
### Patch Changes | ||
- dc554da: Fix `params` resolving as `any` when `pathParams` is missing and zod is not installed | ||
## 3.39.1 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "@ts-rest/core", | ||
"version": "3.39.1", | ||
"version": "3.39.2", | ||
"description": "RPC-like experience over a regular REST API, with type safe server implementations πͺ", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -53,3 +53,3 @@ # ts-rest | ||
```typescript | ||
const contract = c.contract({ | ||
const contract = c.router({ | ||
getPosts: { | ||
@@ -56,0 +56,0 @@ method: 'GET', |
@@ -14,3 +14,3 @@ import { AppRoute, AppRouteMutation, AppRouter, AppRouteStrictStatusCodes, ContractAnyType, ContractNoBodyType, ContractOtherResponse } from './dsl'; | ||
*/ | ||
type PathParamsWithCustomValidators<T extends AppRoute, TClientOrServer extends 'client' | 'server' = 'server'> = T['pathParams'] extends undefined ? PathParamsFromUrl<T> : Merge<PathParamsFromUrl<T>, TClientOrServer extends 'server' ? ZodInferOrType<T['pathParams']> : ZodInputOrType<T['pathParams']>>; | ||
type PathParamsWithCustomValidators<T extends AppRoute, TClientOrServer extends 'client' | 'server' = 'server'> = 'pathParams' extends keyof T ? Merge<PathParamsFromUrl<T>, TClientOrServer extends 'server' ? ZodInferOrType<T['pathParams']> : ZodInputOrType<T['pathParams']>> : PathParamsFromUrl<T>; | ||
export type ResolveResponseType<T extends ContractAnyType | ContractNoBodyType | ContractOtherResponse<ContractAnyType>> = T extends ContractOtherResponse<infer U> ? U : T; | ||
@@ -17,0 +17,0 @@ type AppRouteResponses<T extends AppRoute, TStatus extends HTTPStatusCode, TClientOrServer extends 'client' | 'server', TStrictStatusCodes extends 'default' | 'ignore' | 'force' = 'default'> = { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81419