mirror of https://github.com/grpc/grpc-node.git
proto-loader: declare oneof fields as optional
This commit is contained in:
parent
46a5e517ec
commit
7d39d52b77
|
@ -398,7 +398,7 @@ function generateRestrictedMessageInterface(formatter: TextFormatter, messageTyp
|
||||||
if (options.includeComments) {
|
if (options.includeComments) {
|
||||||
formatComment(formatter, oneof.comment, oneof.options);
|
formatComment(formatter, oneof.comment, oneof.options);
|
||||||
}
|
}
|
||||||
formatter.writeLine(`'${oneof.name}': ${typeString};`);
|
formatter.writeLine(`'${oneof.name}'?: ${typeString};`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (options.outputBranded) {
|
if (options.outputBranded) {
|
||||||
|
|
Loading…
Reference in New Issue