pub fn gen_wasm_error_converter(error: &ErrorDef, core_import: &str) -> StringExpand description
Generate a converter function that maps a core error to a JsValue object
with code (string) and message (string) fields, plus a private
error_code helper that returns the variant code string.