grpc-js-typescript icon indicating copy to clipboard operation
grpc-js-typescript copied to clipboard

Generate gRPC TypeScript definitions for use with gRPC (@grpc/grpc-js).

gRPC TypeScript

Test

This repo shows how to use gRPC with TypeScript & Node.js.

In all cases, @grpc/grpc-js is used as grpc is now effectively deprecated.

TypeScript types are generated at build time from the proto files using different tools as demonstrated in this repo.

Examples

Each example is a separate application. Refer to the README in each project for more information.

  • grpc-proto-loader
  • ts-protoc-gen
  • gradle-ts-protoc-gen
  • grpc_tools_node_protoc_ts
  • grpc-web

Type Parity

Thanks to this issue being fixed, we now have type parity across the different type generator packages. 🎉

Contributions

Contributions I made to help with gRPC & TypeScript support
  • https://github.com/grpc/grpc-node/pull/1368
  • https://github.com/grpc/grpc-node/pull/1380
  • https://github.com/grpc/grpc-node/pull/1387
  • https://github.com/grpc/grpc-node/pull/1419
  • https://github.com/grpc/grpc-node/pull/1454
  • https://github.com/grpc/grpc-node/pull/1587
  • https://github.com/grpc/grpc-node/pull/1590
  • https://github.com/murgatroid99/grpc-node/pull/1
  • https://github.com/murgatroid99/grpc-node/pull/2
  • https://github.com/murgatroid99/grpc-node/pull/3
  • https://github.com/improbable-eng/ts-protoc-gen/pull/236
  • https://github.com/improbable-eng/ts-protoc-gen/pull/247