feat(napi): enable node_api syntax error experimental functions

This commit is contained in:
Idan Attias 2021-12-01 18:18:38 +02:00 committed by LongYinan
parent 201eca63d3
commit a5ba40ceda
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7
3 changed files with 27 additions and 0 deletions
crates/sys/src

View file

@ -850,6 +850,17 @@ extern "C" {
#[cfg(feature = "experimental")]
extern "C" {
pub fn node_api_get_module_file_name(env: napi_env, result: *mut *const c_char) -> napi_status;
pub fn node_api_create_syntax_error(
env: napi_env,
code: napi_value,
msg: napi_value,
result: *mut napi_value,
) -> napi_status;
pub fn node_api_throw_syntax_error(
env: napi_env,
code: *const c_char,
msg: *const c_char,
) -> napi_status;
}
#[repr(C)]