Autogenerate Twirp TypeScript Clients
A Twirp TypeScript client generator. You define your service in a .proto
specification file, and ts-twirp-client
will generate clients for that service.
If you're not familiar with Twirp, check out the Twirp repo and the documentation site.
For more on the motivation behind Twirp (and a comparison to REST APIs and gRPC), check out the announcement blog.
coming soon™️
- Add this package to your project:
yarn add ts-twirp-client
- Generate JSON and Protobuf (coming soon™️) clients:
yarn twirp
- Create a client instance for your service by invoking the generated JSON or Protobuf client code with your host's URI
- Use your configured client to make RPCs to your service
coming soon™️
coming soon™️
Your project must use TypeScript 3.7 or greater.
The default clients use fetch
so your runtime must include fetch
or you need to provide your own transport implementation when constructing your service client.
PR's and issues welcomed! For more guidance check out CONTRIBUTING.md
See the project's MIT License.