- I added the latest version of google-protobuf to web/package.json
- I installed its Flow types via flow-typed install google-protobuf
- I generated web/protobufs/identity-client.cjs and web/protobufs/identity-structs.cjs by running protoc -I=shared/protos/ identity_client.proto --js_out=import_style=commonjs:web/protobufs and then added the @generated line to hide them from Phabricator diffs
- I wrote web/protobufs/identity-client.cjs.flow and web/protobufs/identity-structs.cjs.flow, which were inspired by TypeScript bindings generated with protoc -I=shared/protos/ identity_client.proto --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:.
- I wrote flow-typed/npm/grpc-web_v1.x.x.js, only typing the things that were needed for the last step
Details
Details
I tested the code and the Flow types with this patch: https://gist.github.com/Ashoat/7cf4a0fbdebc152d585884184bc0ac07
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Gave it a very brief skim, but looks reasonable. Assuming we don't care about the 80char/line limit for these files.
which were inspired by TypeScript bindings generated with protoc -I=shared/protos/ identity_client.proto --grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:.
Might've been helpful to have a link to a Gist or something so I could quickly do a side-by-side, have caught minor discrepancies in the past that way.
Comment Actions
Might've been helpful to have a link to a Gist or something so I could quickly do a side-by-side, have caught minor discrepancies in the past that way.
Roger, will make sure to do that next time