Skip to content
New issue

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

[js] export BinaryEncoder, BinaryDecoder #7739

Closed
jackielii opened this issue Jul 20, 2020 · 2 comments
Closed

[js] export BinaryEncoder, BinaryDecoder #7739

jackielii opened this issue Jul 20, 2020 · 2 comments
Assignees

Comments

@jackielii
Copy link

jackielii commented Jul 20, 2020

What language does this apply to?

javascript, nodejs

Describe the problem you are trying to solve.

I want to use the low level binary serialisation

Describe the solution you'd like

export BinaryEncoder, BinaryDecoder & arith.Int64, arith.Uint64

Describe alternatives you've considered

fork the project

Additional context

Actually the typescript typings seems to think they're exported:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/google-protobuf/index.d.ts

@perezd
Copy link
Contributor

perezd commented Oct 22, 2020

I think your best option here is to fork it.

@perezd perezd closed this as completed Oct 22, 2020
@jackieli-tes
Copy link

Update:

I found that using patch-package is a better approach. The only line need to be added is:

exports.BinaryDecoder=jspb.BinaryDecoder;exports.BinaryEncoder=jspb.BinaryEncoder;exports.arith={};exports.arith.Int64=jspb.arith.Int64;exports.arith.UInt64=jspb.arith.UInt64;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants