Currently Napi::ThreadSafeFunction accepts a type implementing void operator()(Napi::Env env, Function jsCallback, DataType* data). It would be hard to retrieve the initial context parameter on Napi::ThreadSafeFunction::New since there is only one parameter DataType* data or we have to wrap the data with a reference to context again.
Currently
Napi::ThreadSafeFunctionaccepts a type implementingvoid operator()(Napi::Env env, Function jsCallback, DataType* data). It would be hard to retrieve the initial context parameter onNapi::ThreadSafeFunction::Newsince there is only one parameterDataType* dataor we have to wrap the data with a reference to context again.