mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-15 14:01:25 +00:00
Handle exceptions from JSON::stringify
This commit is contained in:
@ -2683,8 +2683,8 @@ extern "C" {
|
||||
/// specified.
|
||||
///
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
|
||||
#[wasm_bindgen(static_method_of = JSON)]
|
||||
pub fn stringify(obj: &JsValue) -> JsString;
|
||||
#[wasm_bindgen(catch, static_method_of = JSON)]
|
||||
pub fn stringify(obj: &JsValue) -> Result<JsString, JsValue>;
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user