This repo shows various different methods of working with TypeScript & gRPC (using @grpc/grpc-js
).
Each example is a separate application. Refer to the README in each project for more information.
- grpc-proto-loader - Uses @grpc/proto-loader to generate the types (no proto compiler used)
- ts-protoc-gen - Uses the proto compiler &
ts-protoc-gen
to generate the types - gradle-ts-protoc-gen - Uses Gradle, the proto compiler &
ts-protoc-gen
to generate the types - grpc_tools_node_protoc_ts - Uses the proto compiler &
grpc_tools_node_protoc_ts
to generate the types - grpc-web - Uses the proto compiler &
ts-protoc-gen
to generate the types
It's worth noting that both the ts-protoc-gen
and grpc_tools_node_protoc_ts
npm packages provide a proto compiler plugin binary file called protoc-gen-ts
and this can lead to some confusion when trying out the two different packages.