Skip to content
forked from BitGo/api-ts

Type- and runtime- safe TypeScript APIs

License

Notifications You must be signed in to change notification settings

bitgopatmcl/api-ts

 
 

Repository files navigation

api-ts

Build Status

A collection of packages for defining and using type-checked APIs with TypeScript.

TypeScript is a powerful type system layered on top of JavaScript, but lacks type information about values received at runtime. This is an explicit non-goal of the TypeScript language, so we use io-ts to statically type this runtime data. io-ts-http builds on top of io-ts to define codecs that translate between HTTP requests and plain old JavaScript objects. Additionally, it provides a way to group these codecs into route definitions, and then collect the route definitions into an API. The resulting API definitions may then be used on the client and server to have type-checked and runtime-validated HTTP calls in a standardized manner.

Developing

npm install
npm run build
npm test

License

This work is published under the Apache 2.0 license.

SPDX-License-Identifier: Apache-2.0

About

Type- and runtime- safe TypeScript APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 92.5%
  • JavaScript 5.8%
  • Other 1.7%