diff --git a/test/threadsafe_function/threadsafe_function.cc b/test/threadsafe_function/threadsafe_function.cc index 529bfb308..e9b16083b 100644 --- a/test/threadsafe_function/threadsafe_function.cc +++ b/test/threadsafe_function/threadsafe_function.cc @@ -2,6 +2,8 @@ #include #include "napi.h" +#if (NAPI_VERSION > 3) + using namespace Napi; constexpr size_t ARRAY_LENGTH = 10; @@ -177,3 +179,5 @@ Object InitThreadSafeFunction(Env env) { return exports; } + +#endif