Lays the groundwork for defining and safely using ThreadsafeFunctions outside of the JS main thread (e.g. in the event loop).
TDTLSDFGULJHKRAYASY4NMCRPY6CFK4KFGTHKB6AHZWMWPCULHQAC use super::macros::threadsafe_function;
macro_rules! threadsafe_function {($js_namespace_name:literal: $module_name:ident {$($function_js_name:literal: $function_module_name:ident($($argument_type:ty),+) -> $return_type:ty;)*}) => {pub mod $module_name {$(pub mod $function_module_name {use napi::bindgen_prelude::JsObjectValue;pub type Arguments = napi::bindgen_prelude::FnArgs<($($argument_type,)*)>;pub type Return = $return_type;pub type Prototype = napi::threadsafe_function::ThreadsafeFunction<Arguments,Return,Arguments,napi::Status,false,false,0,>;pub fn get(env: &napi::Env) -> Result<Prototype, napi::Error> {let vscode_object = crate::vscode_sys::VscodeContext::vscode(env)?;let namespace: napi::bindgen_prelude::Object = vscode_object.get_named_property($js_namespace_name)?;namespace.get_named_property($function_js_name)}})*}};}pub(crate) use threadsafe_function;
pub(super) use threadsafe_function::threadsafe_function;