-
Notifications
You must be signed in to change notification settings - Fork 47
Protoc output: NodeJS
Mya Pitzeruse edited this page Apr 29, 2021
·
2 revisions
TODO
Decisions to be made:
- language support
- vanilla js (es6+ or whatever the latest version is)
- typescript? (providing definitions would definitely be helpful to the community)
- to use
@grpc/proto-loader
or do static codegen (community seems to use proto-loader more?)- The proto-loader repository provides a brief overview of the generated types.
- For static code-generation, messages can use built-in js generator with
commonjs
modules. In theory, the generated client/server should only need to import the messages file.
One improvement that would be nice to make to the gRPC signature would be if clients could use async/await instead of being forced into the callback pattern. I've seen some libraries that transparently handle this case and it would be a nice improvement over the gRPC interfaces which only support callbacks (last I looked).