%dw 2.0
output application/json
import * from dw::core::Types
type AFunction = (String, Number) -> Number
type AFunction2 = () -> Number
---
{
a: functionParamTypes(AFunction),
b: functionParamTypes(AFunction2)
}
functionParamTypes
functionParamTypes(Type): Array<FunctionParam>
Returns the list of parameters from the given function type. This function fails if the provided type is not a Function type.
Introduced in DataWeave 2.3.0. Supported by Mule 4.3 and later.
Example
This example shows how functionParamTypes
behaves with different inputs.