-
Notifications
You must be signed in to change notification settings - Fork 145
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Protobuf has enum options. For example:
extend google.protobuf.EnumOptions {
bool enum_opt_bool = 2001;
}
extend google.protobuf.EnumValueOptions {
bool enum_value_opt_bool = 3001;
}
enum AnnotatedEnum {
option (spec.enum_opt_bool) = true;
UNSPECIFIED = 0;
FOO = 1 [(spec.enum_value_opt_bool) = true];
}
These options should be made available in the generated code as JSON, just like field and service / method options already are.
Implementation is probably not straight-forward because there is no good place to put the data. One approach could be to use symbols to add the options to a hidden property on the TypeScript enum object.
fython
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request