| 19 | } |
| 20 | |
| 21 | static void Initialize(Napi::Env env, Napi::Object exports) { |
| 22 | const char* name = "FunctionTest"; |
| 23 | Napi::Function func = DefineClass(env, name, {}); |
| 24 | Napi::FunctionReference* ctor = new Napi::FunctionReference(); |
| 25 | *ctor = Napi::Persistent(func); |
| 26 | env.SetInstanceData(ctor); |
| 27 | exports.Set(name, func); |
| 28 | } |
| 29 | |
| 30 | static Napi::Function GetConstructor(Napi::Env env) { |
| 31 | return env.GetInstanceData<Napi::FunctionReference>()->Value(); |
nothing calls this directly
no test coverage detected