protobufjs / protobuf.js

Protocol Buffers for JavaScript & TypeScript.
Other
9.83k stars 1.41k forks source link

Generate FlowType definitions #939

Open vjpr opened 6 years ago

vjpr commented 6 years ago

Would be cool to have FlowType definitions generated as well as the TypeScript defs.

dcodeIO commented 6 years ago

Would be cool, yeah, but that's nothing I'd spend time on because I use TS exclusively.

For reference, this is what's used for TS: https://github.com/dcodeIO/protobuf.js/tree/master/cli/lib/tsd-jsdoc

The CLI utility could be named pbflow or something.

stereobooster commented 6 years ago

See also gRPC to Flow

vjpr commented 6 years ago

I tried flowgen which converts d.ts to flow.js. Conversion works okay. But I think I will modify flowgen just to extract the types instead of the protobufjs classes...or just convert the protobufjs json output to flow types.