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

optional map? #574

Closed
cprovatas opened this issue May 26, 2022 · 4 comments
Closed

optional map? #574

cprovatas opened this issue May 26, 2022 · 4 comments

Comments

@cprovatas
Copy link

cprovatas commented May 26, 2022

First, thanks for all the work you are doing to maintain this project. It's definitely the most powerful TS protobuf framework out there! 🙏

Maybe it's a newb question, but is there a way to declare an optional map? I didn't see any kind of wrapper type for that. Any possible alternatives aside from using struct?

@stephenh
Copy link
Owner

Hey @cprovatas , honestly I'm not sure if optional maps are allowed in proto3 or not. Feel free to try it, and report back if it does/does not work.

@cprovatas
Copy link
Author

cprovatas commented May 30, 2022

It doesn't convert to optional unfortunately. Perhaps this could be addressed by something like #397 (comment)

@stephenh
Copy link
Owner

Ah yeah, @cprovatas that #397 should have been closed as fixed, b/c we have useOptionals=all now; you could try that.

@cprovatas
Copy link
Author

nice, thanks!

This issue was closed.
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

2 participants