Skip to content

Commit 4353054

Browse files
authored
Update grpc_tools exmample (#11)
1 parent 30faa07 commit 4353054

File tree

7 files changed

+398
-5993
lines changed

7 files changed

+398
-5993
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# grpc-js types
22

3-
This repo shows how to use gRPC with TypeScript.
3+
This repo shows how to use gRPC with TypeScript.
44

55
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/).
66

@@ -10,11 +10,15 @@ TypeScript types are generated at build time from the proto files using differen
1010

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

13-
- [grpc-proto-loader](./examples/grpc-proto-loader)
14-
- [ts-protoc-gen](./examples/ts-protoc-gen)
15-
- [gradle-ts-protoc-gen](./examples/gradle-ts-protoc-gen)
13+
- [grpc-proto-loader](./examples/grpc-proto-loader)
14+
- [ts-protoc-gen](./examples/ts-protoc-gen)
15+
- [gradle-ts-protoc-gen](./examples/gradle-ts-protoc-gen)
1616
- [grpc_tools_node_protoc_ts](./examples/grpc_tools_node_protoc_ts)
17-
- [grpc-web](./examples/grpc-web)
17+
- [grpc-web](./examples/grpc-web)
18+
19+
## Type Parity
20+
21+
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. 🎉
1822

1923
## Contributions
2024

@@ -29,6 +33,6 @@ These are the various contributions I made to help with gRPC & TypeScript suppor
2933
- https://github.com/grpc/grpc-node/pull/1590
3034
- https://github.com/murgatroid99/grpc-node/pull/1
3135
- https://github.com/murgatroid99/grpc-node/pull/2
32-
- https://github.com/murgatroid99/grpc-node/pull/3
36+
- https://github.com/murgatroid99/grpc-node/pull/3
3337
- https://github.com/improbable-eng/ts-protoc-gen/pull/236
3438
- https://github.com/improbable-eng/ts-protoc-gen/pull/247

examples/grpc_tools_node_protoc_ts/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ This example shows how to use the [proto compiler](https://www.npmjs.com/package
44

55
The [proto compiler](https://www.npmjs.com/package/grpc-tools) and [`grpc_tools_node_protoc_ts`](https://www.npmjs.com/package/grpc_tools_node_protoc_ts) compiler plugin are used to generate JavaScript & TypeScript files from the proto definitions and [`google-protobuf`](https://www.npmjs.com/package/google-protobuf) & [`@grpc/grpc-js`](https://www.npmjs.com/package/@grpc/grpc-js) is used at runtime.
66

7-
## Issues with this approach
8-
9-
The generated server type is incompatible with the gRPC service implementation. You'll need to use `// @ts-ignore` when adding the service.
10-
117
## App layout
128

139
- [package.json](./package.json) - Dependencies and node build scripts

0 commit comments

Comments
 (0)