This is from Orchard CMS codegen. I do not understand and how the code below is not throwing syntax errors. Mainly, [parameter]:[Object] as well as the use of () => [an anonymous function perhaps]
return ContentShape("Parts_Product",
() => shapeHelper.Parts_Product(
Sku: part.Sku,
Price: part.Price));
You’re right about the first part; the
() => ...represents an anonymous function that takes no arguments.The second part you’re confused about is known as named arguments. It’s just like any other function call, except the code is explicitly stating which argument belongs to which parameter.