grpc / grpc-web

gRPC for Web Clients
https://grpc.io
Apache License 2.0
8.67k stars 764 forks source link

Future Roadmap of Typescript Definition Generation #412

Open jonnyreeves opened 5 years ago

jonnyreeves commented 5 years ago

👋 Hello, I'm one of the maintainers of ts-protoc-gen, we are currently considering the future of our package in an RFC and would appreciate your thoughts on the following topic which will help us steer our own roadmap.

As part of considering the future of ts-protoc-gen, we are thinking that it would benefit the wider TypeScript community to split ts-protoc-gen into 2 separate plugins:

a) a protoc plugin dedicated to generating service stubs for use with improbable-eng/grpc-web clients.

b) a protoc plugin for generating the TypeScript definitions to accompany the messages generated by protoc's JavaScript language support (which can be used by any TypeScript project regardless of which (if any) grpc service implementation is being used).

It's great that protoc-gen-grpc-web provides support for generating Typescript definitions for both messages and services, however if the TypeScript definition generation was moved up into protoc itself, or extracted into a separate plugin then we would no longer need to create and maintain plugin B mentioned above.

I'd love hear your thoughts on this and see if we can combine efforts to provide a more unified, and flexible set of tools for TypeScript developers

stanley-cheung commented 5 years ago

Yea, b) is definitely a short-term stop gap strategy here. We had been talking with the protobuf team to see how we can add TypeScript support to the official protocolbuffers JS implementations. When we have more concrete details, we will definitely share it here.

shaxbee commented 5 years ago

I'd be happy to prepare PR in official Protobuf repo. Would be there any way to discuss it?