ipfs / protons

Protocol Buffers for Node.js and the browser without eval
Other
32 stars 23 forks source link

feat: allow overriding bytes as string #141

Closed achingbrain closed 1 month ago

achingbrain commented 1 month ago

Allows interperting a bytes field as a string type in JavaScript:

message MyMessage {
  bytes field = 1 [jstype = JS_STRING];
}
achingbrain commented 1 month ago

Actually this isn't necessary, we can just change bytes to string in the proto file and get the same result.