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

Support for Maps (WIP) #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Support for Maps (WIP) #8

wants to merge 2 commits into from

Conversation

bvandenbos
Copy link

This is early support for a map type. At this stage, I'm mostly looking for feedback and thoughts on whether or not you're interested in eventually supporting maps.

message PhoneBook {
  map<string, Person> phoneLookup = 0;
}

Some caveats:

  1. It doesn't support nested maps (although neither do arrays)
  2. I've only added support for JS/TS.
  3. It only supports strings for keys for now. Values can be anything.
  4. I'm pretty unhappy with the code.

@kevzettler
Copy link

Just ran into a need for this myself curious to @evanw's opinion

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