RESTyped
JSON →RESTyped is a TypeScript specification and lightweight library for end-to-end typing of REST APIs. Current stable version is 1.1.0. It enables sharing request and response types between server and client via a single interface definition, ensuring type safety across HTTP boundaries. Unlike alternatives like tRPC or GraphQL codegen, RESTyped is unopinionated, works with any existing REST API, and adds no runtime overhead for most implementations. It supports common HTTP methods (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) and allows typing params, query, body, and response per route. Requires TypeScript 2.4+. The library itself is just type definitions; integrations exist for Axios and Express (the latter as WIP).
Resources
packagerestyped ↗