netproteus / protobuf2flowtype Goto Github PK
View Code? Open in Web Editor NEWGenerate flowtype definitions for protobuf js objects
Home Page: https://www.npmjs.com/package/protobuf2flowtype
License: MIT License
Generate flowtype definitions for protobuf js objects
Home Page: https://www.npmjs.com/package/protobuf2flowtype
License: MIT License
hi, can the package.json say exactly what version of protobufjs it uses? I've been going around in circles trying to debug why things aren't working and I am guessing maybe it boils down to version mismatches between protobufjs and protobuf2flowtype.
I have protobuf2flowtype 3.0.4 and protobufjs 6.7.3. When I generate the flow typings, I see
const builder = exports.builder = new ProtoBuf.Builder();
but there's no Builder() in the protobuffjs I have afaict. Then when I look at the example in the README for protobuf2flowtype, I see
const builder = exports.builder = ProtoBuf.loadJson(jsonDescriptor);
but there's also no loadJson() in the protobufjs I have.
etc.
The README.md says to use "--protoDir" but that doesn't seem to work for me. Digging into the code, it looks like the right cli flag is actually "--protoRoot" maybe?
Hi, I'm using protobuf2flowtype in my app. So far it has been useful to make sure I'm properly using the attributes of my Protobuf objects with respect to type check. However I noticed that non-existent attributes are not reported as flow errors.
I looked at the generated code and noticed this in node_modules/protobuf2flowtype-runtime/index.js
:
declare class Protobuf$Message<T: ProtoBuf$MessageLiteral, R: Protobuf$RefectType<T>> extends Object {
I wonder why Protobuf$Message
extends Object
? As far as I understand, extending Object
means: use any attribute you want, it's free! It is not really the Protobuf spirit, which is rather strict and would not allow such misconduct.
Your help will be appreciated.
waiting for this to land first grpc/grpc#9004
want the output to be compatible with people using grpc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.