You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Say my protocol has some 64-bit integer fields, but I know their values will always fit into regular Javascript's primitive number types; so I don't want to use Long.js objects to represent them.
I've read somewhere that using Long.js is optional, but I can't find instructions on how to disable it. I am generating static sources using pbjs and it has an option to --force-longs, but Longs seem to always be enabled by default.
I did a hack which consists of executing a bash script after npm install that runs rm -fr node_modules/long. This seems to solve the issue, but I was wondering if there is a more proper way of disabling it.
The text was updated successfully, but these errors were encountered:
luciopaiva
changed the title
How to decode 64-bit integer fields into plain Javacsript numbers?
How to decode 64-bit integer fields into plain Javascript numbers?
Oct 19, 2017
Just checked and it did work! Awesome, thanks. Is this documented somewhere? If it isn't, maybe I could contribute by adding that information to the README. Let me know if it makes sense to you and I can send you a PR.
protobuf.js version: 6.8.0
Say my protocol has some 64-bit integer fields, but I know their values will always fit into regular Javascript's primitive number types; so I don't want to use Long.js objects to represent them.
I've read somewhere that using Long.js is optional, but I can't find instructions on how to disable it. I am generating static sources using
pbjs
and it has an option to--force-long
s, but Longs seem to always be enabled by default.I did a hack which consists of executing a bash script after
npm install
that runsrm -fr node_modules/long
. This seems to solve the issue, but I was wondering if there is a more proper way of disabling it.The text was updated successfully, but these errors were encountered: