Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 17 hours 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 (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-12-18T04:25:41.000Z (about 2 months ago)
- Last Synced: 2025-01-25T14:06:36.540Z (8 days ago)
- Topics: grpc, grpc-js, grpc-node, grpc-typescript, grpc-typescript-definitions, nodejs, typescript
- Homepage:
- Size: 1020 KB
- Stars: 189
- Watchers: 6
- Forks: 22
- Open Issues: 13
-
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
[![Test](https://github.com/badsyntax/grpc-js-typescript/actions/workflows/test.yml/badge.svg)](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