You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well we can see there is a suffix called Map added to my field name! also the generated type is Array<[string, string]>. but what we were expecting, based on language guide here, where an object of {"k": v, …}, like Record<string, V>
What did you expect to see
An object like: Record<string, string>
What did you see instead? Array<[string, string]>
The text was updated successfully, but these errors were encountered:
Based on spec, Map<K, V> sounds better, and that auto-added Map suffix is annoying! I think it is better to let users name their field names. Like what I have here, for metadata, I don't want to have metadataMap; I have types, and everyone using that generated type will understand the return type of this message.
What version of protobuf and what language are you using?
Version: master/v3.18
Language: Javascript
What operating system (Linux, Windows, ...) and version? Linux
What runtime / compiler are you using (e.g., python version or gcc version) Nodejs
What did you do?
Steps to reproduce the behavior:
map<K, V>
so I created aproto
file like this:.ts
files is something like:Map
added to my field name! also the generated type isArray<[string, string]>
. but what we were expecting, based on language guide here, where an object of{"k": v, …}
, likeRecord<string, V>
What did you expect to see
An object like:
Record<string, string>
What did you see instead?
Array<[string, string]>
The text was updated successfully, but these errors were encountered: