Skip to content
This repository was archived by the owner on Jun 15, 2020. It is now read-only.
This repository was archived by the owner on Jun 15, 2020. It is now read-only.

Working example(s)? #19

Description

@btgoodwin

I've searched for days for a working example of how someone has used this library to work with protocol buffers in TypeScript and have come up with nothing. The example provided in the README.md also indicates a method on ProtoBuf (protobufjs, I assume) that does not presently exist in that library (protoFromFile). I admit I'm still learning all the nuances of TypeScript and project configurations, however it would be great to see the source code of a working example for using this library and protobufs in general.

For my particular use case, I have a library that I'm porting from JS/Angular1 to TS/Angular2 as a ES2015 module, and it has some protocol buffers defined in it. I've tried going through the process of converting the proto files to JSON, and then from JSON to typings definitions as indicated in the README.md. I then installed those definitions (d.ts) into my global typings (typings install --global --save file:<path>/file.d.ts). When I then try to reference the default module name generated by this tool, Proto2TypeScript, in my TypeScript files, I get: Cannot find namespace 'Proto2TypeScript'. I also cannot import that module name, etc. which leaves me wondering what part of this process is actually broken since there is no end-to-end example that I can find.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions