Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Guarantee that BufferReader#buf is a Buffer #668
I'm in the process of updating my encoder/decoder generator to match the API of protobuf.js 6.x (currently it mimics protobuf.js 4.x, you can see it here). The generated
I also want to be able to pass the same data type to both my own
Can you update the documentation to state that BufferReader#buf is a Buffer and not just Uint8Array?
Would it be enough if documentation would cover this textually, without changing the actual type to
added a commit
Jan 30, 2017
Seems reasonable to me, although I'm not sure what you mean by
I think it would be particularly useful to note that BufferWriter#finish returns a Buffer since that seems to be its primary difference from Writer.
Also BufferWriter#bytes doesn't need any doc change since it does actually accept Uint8Array, not only Buffer. And BufferWriter#buf doesn't exist.