Giter VIP home page Giter VIP logo

protobuf2flowtype's People

Contributors

greenkeeperio-bot avatar netproteus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

shanshanzhu

protobuf2flowtype's Issues

"--protoRoot" vs. "--protoDir"

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?

Non-existent attributes are not reported as flow errors

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.

make dependencies work?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.