https://github.com/badsyntax/grpc-js-typescript
Generate gRPC TypeScript definitions for use with gRPC (@grpc/grpc-js).
https://github.com/badsyntax/grpc-js-typescript
grpc grpc-js grpc-node grpc-typescript grpc-typescript-definitions nodejs typescript
Last synced: 3 months ago
JSON representation
Generate gRPC TypeScript definitions for use with gRPC (@grpc/grpc-js).
- Host: GitHub
- URL: https://github.com/badsyntax/grpc-js-typescript
- Owner: badsyntax
- Created: 2020-05-10T13:56:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-17T04:29:13.000Z (4 months ago)
- Last Synced: 2025-03-28T17:06:08.957Z (3 months ago)
- Topics: grpc, grpc-js, grpc-node, grpc-typescript, grpc-typescript-definitions, nodejs, typescript
- Homepage:
- Size: 1.1 MB
- Stars: 193
- Watchers: 5
- Forks: 22
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-grpc - grpc-js-typescript - Examples of how to use gRPC with TypeScript & Node.js. (Language-Specific / TypeScript)
README
# gRPC TypeScript
[](https://github.com/badsyntax/grpc-js-typescript/actions/workflows/test.yml)
This repo shows how to use gRPC with TypeScript & Node.js.
In all cases, [`@grpc/grpc-js`](https://www.npmjs.com/package/@grpc/grpc-js) is used as [`grpc`](https://www.npmjs.com/package/grpc) is now [effectively deprecated](https://grpc.io/blog/grpc-js-1.0/).
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](./examples/grpc-proto-loader)
- [ts-protoc-gen](./examples/ts-protoc-gen)
- [gradle-ts-protoc-gen](./examples/gradle-ts-protoc-gen)
- [grpc_tools_node_protoc_ts](./examples/grpc_tools_node_protoc_ts)
- [grpc-web](./examples/grpc-web)## Type Parity
Thanks to [this issue](https://github.com/agreatfool/grpc_tools_node_protoc_ts/issues/79) 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