I know that you can do this for things like Strings, ints, but I am wondering if you can set default values for more complex data types like Maps. I tried with a new keyword and several other ways, but they all throw errors.
The default parameters must be constants. You must define your default values using the keyword const.
const
m([p1 = const['a', 'b']]) => null;
The default values must be constants.
someFunc({someParam: const {'a': 'b'} }) => someParam;
Source: https://habr.com/ru/post/1621306/More articles:Combine traffic bands in NetLogo simulation - netlogoPandas работа с частотой кадров данных - pythonWhy can't I declare template type aliases inside functions? - c ++Is AngularJs calculation loop called after calling any function? - javascriptThe initial state of the element to animate in - javascriptJQuery clone () value input function - javascriptAWK compares two columns in two separate files - comparisonReplace the string string with lowercase using preg_replace () and regex - phphttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1621310/desktop-screen-overlay-new-form-flicker-issue&usg=ALkJrhgf_o5YBdMU5l-8QqiHW2ojaUzWrwPowerShell special module does not autoload - powershellAll Articles