diff --git a/packages/stylist-core/src/error.rs b/packages/stylist-core/src/error.rs index ff64393..952f528 100644 --- a/packages/stylist-core/src/error.rs +++ b/packages/stylist-core/src/error.rs @@ -1,5 +1,10 @@ use thiserror::Error; +#[cfg(target_arch = "wasm32")] +type JsValue = wasm_bindgen::JsValue; +#[cfg(not(target_arch = "wasm32"))] +type JsValue = (); + #[derive(Debug, Error, PartialEq)] pub enum Error { /// Failed to parse CSS. @@ -16,7 +21,7 @@ pub enum Error { /// /// This is usually raised when the style element failed to mount. #[error("Failed to Interact with Web API. Are you running in Browser?")] - Web(Option), + Web(Option), /// Failed to read styles from the StyleManager. ///