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

RPC-like experience over a regular REST API, with type safe server implementations ๐Ÿช„

  • 3.16.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
82K
increased by8.46%
Maintainers
1
Weekly downloads
ย 
Created
Source

ts-rest

RPC-like client and server helpers for a magical end to end typed experience

langue typescript Github Workflow Status npm License Bundle Size Discord

Introduction

ts-rest provides an RPC-like client side interface over your existing REST APIs, as well as allowing you define a separate contract implementation rather than going for a 'implementation is the contract' approach, which is best suited for smaller or simpler APIs.

If you have non typescript consumers, a public API, or maybe want to add type safety to your existing REST API? ts-rest is what you're looking for!

Features

  • End to end type safety ๐Ÿ›Ÿ
  • Magic RPC-like API ๐Ÿช„
  • Tiny bundle size ๐ŸŒŸ (1kb!)
  • Well-tested and production ready โœ…
  • No Code Generation ๐Ÿƒโ€โ™€๏ธ
  • Zod support for body parsing ๐Ÿ‘ฎโ€โ™€๏ธ
  • Full optional OpenAPI integration ๐Ÿ“

Quickstart

Install the core package

yarn add @ts-rest/core
# Optional react-query integration
yarn add @ts-rest/react-query
# Pick your backend
yarn add @ts-rest/nest @ts-rest/express
# For automatic server OpenAPI gen
yarn add @ts-rest/open-api

Create a contract, implement it on your server then consume it in your client. Incrementally adopt, trial it with your team, then get shipping faster.

๐Ÿ‘‰ Read more on the official Quickstart Guide๐Ÿ‘ˆ

Star History

Star History Chart

Contributors โœจ

Thanks goes to these wonderful people (emoji key):

Youssef Gaber
Youssef Gaber

๐Ÿ’ป ๐Ÿค” โš ๏ธ
Per Hermansson
Per Hermansson

๐Ÿ“– ๐Ÿ’ป
Grรฉgory Houllier
Grรฉgory Houllier

๐Ÿ“–
Michael Angelo
Michael Angelo

๐Ÿ“–
Pieter Venter
Pieter Venter

๐Ÿ“–
Rifaldhi AW
Rifaldhi AW

๐Ÿ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

Keywords

FAQs

Package last updated on 05 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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