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

Improved map-to-any casts based on fixed typings of google-protobuf #81

Merged
merged 9 commits into from
Aug 14, 2021

Conversation

renkei
Copy link
Contributor

@renkei renkei commented Aug 11, 2021

I'm not sure if it's worth but this PR changes the map-to-any casts in the generated code from

(pb_1.Map as any).deserializeBinary(message.map_field, reader, ...)

to

pb_1.Map.deserializeBinary(message.map_field as any, reader, ...)

because static Map.deserializeBinary(...) is finally available in @types/google-protobuf. Nevertheless, another cast for the first argument is still required because a protobuf Map is expected but an ES6 Map is passed.

@renkei
Copy link
Contributor Author

renkei commented Aug 14, 2021

I've updated the PR to an even newer @types/google-protobuf version 3.15.5 with additional fixes, see #55084 for details.

@thesayyn thesayyn merged commit 8db40bb into thesayyn:master Aug 14, 2021
@thesayyn
Copy link
Owner

Thank you so much for working on this. I will get this released ASAP.

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

Successfully merging this pull request may close these issues.

2 participants