How does one get the options associated with a protocol buffer field?
Suppose I have a field with a custom option like:
syntax = "proto3";
package main;
import "google/protobuf/descriptor.proto";
extend google.protobuf.FieldOptions {
bool required = 7000;
}
message Person {
string name = 1 [(required) = true];
}
Generated the js files with protoc
protoc -I . *.proto --js_out=import_style=commonjs,binary:js
I have read on how to retrieve the option in other languages from here, but can seem to get any working in Javascript.
Any help would be greatly appreciated!