diff --git a/crates/js-sys/src/lib.rs b/crates/js-sys/src/lib.rs index 0084e1632d4..2db0d4bc00c 100644 --- a/crates/js-sys/src/lib.rs +++ b/crates/js-sys/src/lib.rs @@ -1024,6 +1024,14 @@ impl Default for BigInt { } } +impl FromStr for BigInt { + type Err = Infallible; + + fn from_str(s: &str) -> Result { + Ok(BigInt::new(&s.into())) + } +} + // Boolean #[wasm_bindgen] extern "C" {