@@ -119,12 +119,9 @@ namespace Napi {
119119 class Value ;
120120 class Boolean ;
121121 class Number ;
122- // Currently experimental guard with the definition of NAPI_EXPERIMENTAL.
123- // Once it is no longer experimental guard with the NAPI_VERSION in which it is
124- // released instead.
125- #ifdef NAPI_EXPERIMENTAL
122+ #if NAPI_VERSION > 5
126123 class BigInt ;
127- #endif // NAPI_EXPERIMENTAL
124+ #endif // NAPI_VERSION > 5
128125#if (NAPI_VERSION > 4)
129126 class Date ;
130127#endif
@@ -147,13 +144,10 @@ namespace Napi {
147144 typedef TypedArrayOf<uint32_t > Uint32Array; // /< Typed-array of unsigned 32-bit integers
148145 typedef TypedArrayOf<float > Float32Array; // /< Typed-array of 32-bit floating-point values
149146 typedef TypedArrayOf<double > Float64Array; // /< Typed-array of 64-bit floating-point values
150- // Currently experimental guard with the definition of NAPI_EXPERIMENTAL.
151- // Once it is no longer experimental guard with the NAPI_VERSION in which it is
152- // released instead.
153- #ifdef NAPI_EXPERIMENTAL
147+ #if NAPI_VERSION > 5
154148 typedef TypedArrayOf<int64_t > BigInt64Array; // /< Typed array of signed 64-bit integers
155149 typedef TypedArrayOf<uint64_t > BigUint64Array; // /< Typed array of unsigned 64-bit integers
156- #endif // NAPI_EXPERIMENTAL
150+ #endif // NAPI_VERSION > 5
157151
158152 // / Defines the signature of a N-API C++ module's registration callback (init) function.
159153 typedef Object (*ModuleRegisterCallback)(Env env, Object exports);
@@ -257,12 +251,9 @@ namespace Napi {
257251 bool IsNull () const ; // /< Tests if a value is a null JavaScript value.
258252 bool IsBoolean () const ; // /< Tests if a value is a JavaScript boolean.
259253 bool IsNumber () const ; // /< Tests if a value is a JavaScript number.
260- // Currently experimental guard with the definition of NAPI_EXPERIMENTAL.
261- // Once it is no longer experimental guard with the NAPI_VERSION in which it is
262- // released instead.
263- #ifdef NAPI_EXPERIMENTAL
254+ #if NAPI_VERSION > 5
264255 bool IsBigInt () const ; // /< Tests if a value is a JavaScript bigint.
265- #endif // NAPI_EXPERIMENTAL
256+ #endif // NAPI_VERSION > 5
266257#if (NAPI_VERSION > 4)
267258 bool IsDate () const ; // /< Tests if a value is a JavaScript date.
268259#endif
@@ -335,10 +326,7 @@ namespace Napi {
335326 double DoubleValue () const ; // /< Converts a Number value to a 64-bit floating-point value.
336327 };
337328
338- // Currently experimental guard with the definition of NAPI_EXPERIMENTAL.
339- // Once it is no longer experimental guard with the NAPI_VERSION in which it is
340- // released instead.
341- #ifdef NAPI_EXPERIMENTAL
329+ #if NAPI_VERSION > 5
342330 // / A JavaScript bigint value.
343331 class BigInt : public Value {
344332 public:
@@ -377,7 +365,7 @@ namespace Napi {
377365 // / be needed to store this BigInt (i.e. the return value of `WordCount()`).
378366 void ToWords (int * sign_bit, size_t * word_count, uint64_t * words);
379367 };
380- #endif // NAPI_EXPERIMENTAL
368+ #endif // NAPI_VERSION > 5
381369
382370#if (NAPI_VERSION > 4)
383371 // / A JavaScript date value.
@@ -859,13 +847,10 @@ namespace Napi {
859847 : std::is_same<T, uint32_t >::value ? napi_uint32_array
860848 : std::is_same<T, float >::value ? napi_float32_array
861849 : std::is_same<T, double >::value ? napi_float64_array
862- // Currently experimental guard with the definition of NAPI_EXPERIMENTAL.
863- // Once it is no longer experimental guard with the NAPI_VERSION in which it is
864- // released instead.
865- #ifdef NAPI_EXPERIMENTAL
850+ #if NAPI_VERSION > 5
866851 : std::is_same<T, int64_t >::value ? napi_bigint64_array
867852 : std::is_same<T, uint64_t >::value ? napi_biguint64_array
868- #endif // NAPI_EXPERIMENTAL
853+ #endif // NAPI_VERSION > 5
869854 : unknown_array_type;
870855 }
871856 // / !endcond
0 commit comments