We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I noticed that in a proto file when there is no package set, then the enums are missing the first character.
package
syntax = "proto3"; enum Status { CREATED = 0; PROCESSING = 1; } message InfoResponse { Status status = 1; }
will produce tatus instead of Status
tatus
Status
export class InfoResponse extends jspb.Message { getStatus(): tatus; setStatus(value: tatus): InfoResponse; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): InfoResponse.AsObject; static toObject(includeInstance: boolean, msg: InfoResponse): InfoResponse.AsObject; static serializeBinaryToWriter(message: InfoResponse, writer: jspb.BinaryWriter): void; static deserializeBinary(bytes: Uint8Array): InfoResponse; static deserializeBinaryFromReader(message: InfoResponse, reader: jspb.BinaryReader): InfoResponse; } export namespace InfoResponse { export type AsObject = { status: tatus, } } export enum Status { CREATED = 0, PROCESSING = 1, }
It can be fixed by setting a package but it worked fine with empty package with version 1.1.0
I think this change is responsible: cd059a2#diff-2e729f9088e537bfeb6fefc318963a96
return enum_name.substr(1); instead of
return enum_name.substr(1);
if (!js_field_type.empty() && js_field_type[0] == '.') { js_field_type = js_field_type.substr(1); }
The text was updated successfully, but these errors were encountered:
Fix Protobuf .d.ts typings for .proto files without package
b6111fb
Fixes grpc#939
c7fcbba
5a63476
fecfe1c
Fixes #939
Successfully merging a pull request may close this issue.
I noticed that in a proto file when there is no
package
set, then the enums are missing the first character.will produce
tatus
instead ofStatus
It can be fixed by setting a
package
but it worked fine with empty package with version 1.1.0I think this change is responsible:
cd059a2#diff-2e729f9088e537bfeb6fefc318963a96
return enum_name.substr(1);
instead ofThe text was updated successfully, but these errors were encountered: