I am developing an Angular 2 app in which I want to use Protocol Buffers to send data to a Go server.
I found this dcodeIO/protobufjs. But I don't understand how should I use this in my project?
I also tried installing the typings for protobufjs
using typings install dt~protobufjs --global
. When I import it, WebStorm says Cannot find module protobuf
.
Any help is appreciated!
I solved it! I did this npm install @types/protobufjs --save
and I got the type definitions.
Then simply used it like this import * as ProtoBuf from 'protobufjs';
Thanks!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With