Closed sampajano closed 1 year ago
Verified with the example in https://github.com/grpc/grpc-web/issues/1271
// enum.proto
syntax = "proto3"; enum DocEnum { DOC_ENUM_PDF = 0; DOC_ENUM_HTML = 1; }
// test.proto
syntax = "proto3"; import "enum.proto"; package Test; message HelloRequest { DocEnum doc = 1; }
Generate:
protoc -I=. *.proto --js_out=import_style=commonjs,binary:. --grpc-web_out=import_style=typescript,mode=grpcwebtext:.
getDoc(): enum_pbDocEnum; setDoc(value: enum_pbDocEnum): HelloRequest;
getDoc(): enum_pb.DocEnum; setDoc(value: enum_pb.DocEnum): HelloRequest;
Fixes https://github.com/grpc/grpc-web/issues/1271
Verified with the example in https://github.com/grpc/grpc-web/issues/1271
// enum.proto
// test.proto
Generate:
Before
After
Fixes https://github.com/grpc/grpc-web/issues/1271