johanbrandhorst / protobuf

GopherJS Bindings for ProtobufJS and gRPC-Web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

protoc-gen-gopherjs: Add field Has and Clear methods

johanbrandhorst opened this issue · comments

The javascript code defines hasX and clearX for all fields - we should do the same.

Correction - it only generates hasX for Oneof and Message fields in proto3, and only clear for Oneof, messages, repeated and maps: https://developers.google.com/protocol-buffers/docs/reference/javascript-generated.