feat(napi): add experimental flag

This commit is contained in:
LongYinan 2021-12-03 16:30:31 +08:00
parent 49a0139f81
commit 2d5b997b7d
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7
2 changed files with 5 additions and 1 deletions

View file

@ -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"]

View file

@ -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 {