-
Notifications
You must be signed in to change notification settings - Fork 60
Request for help - Typescript, Protocol Buffers and the Browser #501
Comments
Well, further searching landed me back on protocolbuffers/protobuf#420. @lhecker is correct in that thread - there is significant growth in Angular usage, and with gRPC-web, more and more folks will land up here. @rkirov - Please consider this to be the narrowly scoped request for documentation, as mentioned by you in protocolbuffers/protobuf#420. |
Thanks, I think this is fair narrowing down: The caveats are:
|
Thanks Rado.
|
@rkirov Any luck/progress on this request for documentation? It would help a lot. Thanks. |
@rkirov friendly ping a.k.a. polite reminder. |
@Brahmasmi this seems to be possible with the current state of the tools. I've managed to get TypeScript definitions for protocol buffer schemas that I've created using Clutz (via the CLI) and a bit of figuring-out. (The repository I managed to get this working in is open-source, so you can take a look at it if you want: LakeMaps/schemas.) The gist* of the solution is:
* I needed a few extra things to get everything to work just right, like adding I don't know how you want to involve Angular here, but getting TypeScript definitions should work with any TypeScript project including Angular. Edit: please don't misconstrue the Contributor note on this comment as anything official, I'm not part of the project team. |
Thank you @whymarrh for the very detailed steps. As a rookie, I cannot thank you enough for the very relevant guidance - Closure over CommonJS, I will follow these steps and report back on how well it works. |
Sorry for the radio silence here. Basically I wrote up something like #501 (comment) and decided that the experience is so bad for someone unfamiliar with Closure compiler that it is not worth it. I rather recommend using something like https://github.com/dcodeIO/ProtoBuf.js/ and skipping clutz althogether. |
Landed up here from microsoft/TypeScript#9509 (comment).
Could the clutz team please document an end to end workflow for using protocol buffers on the browser side using typescript within Angular?
Based on @evmar 's comment referenced earlier, there is a workflow to achieve the above within Google. But, just like many others on that thread have discovered, it is not very obvious and/or feasible to folks who may not be very proficient with Closure Compiler and/or Protocol Buffers.
Thanks.
The text was updated successfully, but these errors were encountered: