diff --git a/crates/napi/Cargo.toml b/crates/napi/Cargo.toml index 93e458c3..21d25610 100644 --- a/crates/napi/Cargo.toml +++ b/crates/napi/Cargo.toml @@ -11,9 +11,10 @@ version = "2.0.0-beta.1" [features] async = ["tokio_rt"] +experimental = ["napi-sys/experimental"] compat-mode = [] default = ["napi3", "compat-mode"] # for most Node.js users -full = ["latin1", "napi8", "async", "serde-json"] +full = ["latin1", "napi8", "async", "serde-json", "experimental"] latin1 = ["encoding_rs"] napi1 = [] napi2 = ["napi1"] diff --git a/crates/napi/src/error.rs b/crates/napi/src/error.rs index 89810716..846dea58 100644 --- a/crates/napi/src/error.rs +++ b/crates/napi/src/error.rs @@ -151,6 +151,9 @@ pub struct JsTypeError(Error); pub struct JsRangeError(Error); +#[cfg(feature = "experimental")] +pub struct JsSyntaxError(Error); + macro_rules! impl_object_methods { ($js_value:ident, $kind:expr) => { impl $js_value {