Passing string to functions args in place of C3 object

#1

Will a function argument value be made from String, when user calls from client with a string value. i.e with a c3 function definition “f: function(d: MyRef)” and invocation of f(“myRefString”) will it do f(MyRef.fromString(“myRefString”)).

0 Likes

What is the default input to the get()?
#2

Answer from @JohnCoker:
Yes. Any context supporting object conversion will apply the requested type fromString if implemented when a string value is found.
Currently, object conversion is supported when making an object (from JS, not Java) and when calling a method (all languages).

0 Likes