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
protobuf.js version: 6.7.3
disclaimer: I am pretty new to typescript modules and using npm, so I might be missing something basic
I am trying to generate static module form my .proto file, but generated definitions file doesn't contain any properties or method on my messages
I have very simple proto file:
syntax = "proto3"; message TestMessage { int64 userId = 1; string userName = 2; }
which I am trying to turn into static module using
pbjs -t static-module -w es6 -o pbmessages.js ./messages.proto pbts -o pbmessages.d.ts pbmessages.js
This results in:
type TestMessage$Properties = { userId?: (number|Long); userName?: string; }; export class TestMessage { constructor(properties?: TestMessage$Properties); }
When I remove the --es6 param, I get results that looks correctly:
type TestMessage$Properties = { userId?: (number|Long); userName?: string; }; export class TestMessage { constructor(properties?: TestMessage$Properties); public userId: (number|Long); public userName: string; public static create(properties?: TestMessage$Properties): TestMessage; public static encode(message: TestMessage$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static encodeDelimited(message: TestMessage$Properties, writer?: $protobuf.Writer): $protobuf.Writer; public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): TestMessage; public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): TestMessage; public static verify(message: { [k: string]: any }): string; public static fromObject(object: { [k: string]: any }): TestMessage; public static from(object: { [k: string]: any }): TestMessage; public static toObject(message: TestMessage, options?: $protobuf.ConversionOptions): { [k: string]: any }; public toObject(options?: $protobuf.ConversionOptions): { [k: string]: any }; public toJSON(): { [k: string]: any }; }
The text was updated successfully, but these errors were encountered:
closed because it is duplicate of #820
Sorry, something went wrong.
No branches or pull requests
protobuf.js version: 6.7.3
disclaimer: I am pretty new to typescript modules and using npm, so I might be missing something basic
I am trying to generate static module form my .proto file, but generated definitions file doesn't contain any properties or method on my messages
I have very simple proto file:
which I am trying to turn into static module using
This results in:
When I remove the --es6 param, I get results that looks correctly:
The text was updated successfully, but these errors were encountered: