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
Is there any simple 2-3 terms rule that allow. to grasp some general idea behind the types mapping/conversion among js and golang spaces or is it more like a batch of a lot individual cases?
E.g. in particular to cover such questions
jsfunction() {} instance is just a func () one in golang or could it be as well be an object with a constructor of Function and the methods of call, apply etc. Could it be just chosen among both cases?
Or is there any chance to map something like someFunc in the following example into golang space
constsomeFunc=(a)=>a+1;someFunc.other=(a)=>a*2;
As I understood any "scalar" types and their related pointers in golang are just mapped the similarly into respective js primitives?
As both jshashes and any class instances mapped to either map[string]any or related struct{} still is it possible to restrict mapping to fail from js into a struct{} if there're any extra property exists in js object that is non presented in golang one?
Could jsSymbol-indexed properties or even Maps be mapped into something like map[any]any
etc.
Thank you
The text was updated successfully, but these errors were encountered:
Hi!
Is there any simple 2-3 terms rule that allow. to grasp some general idea behind the types mapping/conversion among
js
andgolang
spaces or is it more like a batch of a lot individual cases?E.g. in particular to cover such questions
js
function() {}
instance is just afunc ()
one ingolang
or could it be as well be an object with a constructor ofFunction
and the methods ofcall
,apply
etc. Could it be just chosen among both cases?Or is there any chance to map something like
someFunc
in the following example intogolang
spacegolang
are just mapped the similarly into respectivejs
primitives?js
hashes
and anyclass instances
mapped to eithermap[string]any
or relatedstruct{}
still is it possible to restrict mapping to fail fromjs
into astruct{}
if there're any extra property exists injs
object that is non presented ingolang
one?js
Symbol
-indexed properties or evenMaps
be mapped into something likemap[any]any
Thank you
The text was updated successfully, but these errors were encountered: