let {% if is_mut %}mut {% endif %}{{ param_name }}_core: {{ core_path }} = if {{ param_name }}.is_undefined() {
        {% if has_default %}{{ core_path }}::default(){% else %}return Err(JsValue::from_str("{{ param_name }} is required")){% endif %}
    } else {
        serde_wasm_bindgen::from_value::<{{ core_path }}>({{ param_name }}){{ err_conv }}?
    };
