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
typeFoomap[string]string// GojaExportEntries is used as a marker for goja to export the map entries instead of its methods.func (_Foo) GojaExportEntries() {}
// Without the above, the map would always be exported as an object with this method only.func (fFoo) SomeMethod() {}
The text was updated successfully, but these errors were encountered:
Since 4e76d88 any
map
type implementing methods will cause those methods to be exposed to JS, but not any of themap
entries, to avoid ambiguity.Now I'm in a scenario where I need the exact opposite behavior: all the map entries should be exposed as properties and none of the methods.
This could be solved with a customizable
ToValue
: #426Would you prefer solving this issue via #426 or would you accept a PR with an alternative solution for this case specifically?
For instance, we could use "marker" interfaces:
The text was updated successfully, but these errors were encountered: