I try to create some custom widget with some parameter in the constructor. This widget has some optional and required parameter. how can make Function type paramete
Function
Another option if you don't like named parameters (like me :/) is:
function_name (argument1, [argument2]) { // statements }
arguments in brackets are optional.
source