nodejs-pubsub icon indicating copy to clipboard operation
nodejs-pubsub copied to clipboard

Invalid IPubsubMessage.data type

Open HNicolas opened this issue 4 years ago • 3 comments

https://github.com/googleapis/nodejs-pubsub/blob/76db007f270a646e8570768fa827ea2a97b62cbc/protos/protos.d.ts#L441

IPubsubMessage.data type seems to be Buffer and it is typed as UInt8Array|string.

HNicolas avatar Nov 10 '20 11:11 HNicolas

@HNicolas Thanks for the report!

@alexander-fenster This looks like an issue with proto generation maybe?

feywind avatar Nov 15 '20 16:11 feywind

@feywind Yes, seems like I will need to add Buffer here: https://github.com/googleapis/gax-nodejs/blob/master/tools/compileProtos.ts#L141 - we do some serious hacking on the generated protos.d.ts. I will fix it (but probably not earlier than I come back from vacation), or feel free to make a fix there and release! (it will, unfortunately, trigger regeneration of all libraries)

alexander-fenster avatar Nov 18 '20 03:11 alexander-fenster

I'm moving this over to a cleanup item because it's going to cause a lot of churn, and maybe it's not the best time for it. I'm leaving it on the backlog here for now though.

feywind avatar Jun 18 '21 19:06 feywind