I’d like to define a psuedo strongly typed object but still be able to define it inline.
current solution:
callMethod({param1:paramvalue,param2:paramvalue2});
I’d like to use similar inline syntax but the parameter ‘object’ to only contain a specific list of parameters. IE: only allow param1 & param2 but not param3.
I’d be happy with something like this:
callMethod(mytype(param1:paramvalue,param2:paramvalue2);
This is what you want: