Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

@ts-rest/core

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-rest/core - npm Package Compare versions

Comparing version 3.39.1 to 3.39.2

6

CHANGELOG.md
# @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 @@

2

package.json
{
"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'> = {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc