@@ -119,12 +119,9 @@ namespace Napi {
119
119
class Value ;
120
120
class Boolean ;
121
121
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
126
123
class BigInt ;
127
- #endif // NAPI_EXPERIMENTAL
124
+ #endif // NAPI_VERSION > 5
128
125
#if (NAPI_VERSION > 4)
129
126
class Date ;
130
127
#endif
@@ -147,13 +144,10 @@ namespace Napi {
147
144
typedef TypedArrayOf<uint32_t > Uint32Array; // /< Typed-array of unsigned 32-bit integers
148
145
typedef TypedArrayOf<float > Float32Array; // /< Typed-array of 32-bit floating-point values
149
146
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
154
148
typedef TypedArrayOf<int64_t > BigInt64Array; // /< Typed array of signed 64-bit integers
155
149
typedef TypedArrayOf<uint64_t > BigUint64Array; // /< Typed array of unsigned 64-bit integers
156
- #endif // NAPI_EXPERIMENTAL
150
+ #endif // NAPI_VERSION > 5
157
151
158
152
// / Defines the signature of a N-API C++ module's registration callback (init) function.
159
153
typedef Object (*ModuleRegisterCallback)(Env env, Object exports);
@@ -257,12 +251,9 @@ namespace Napi {
257
251
bool IsNull () const ; // /< Tests if a value is a null JavaScript value.
258
252
bool IsBoolean () const ; // /< Tests if a value is a JavaScript boolean.
259
253
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
264
255
bool IsBigInt () const ; // /< Tests if a value is a JavaScript bigint.
265
- #endif // NAPI_EXPERIMENTAL
256
+ #endif // NAPI_VERSION > 5
266
257
#if (NAPI_VERSION > 4)
267
258
bool IsDate () const ; // /< Tests if a value is a JavaScript date.
268
259
#endif
@@ -335,10 +326,7 @@ namespace Napi {
335
326
double DoubleValue () const ; // /< Converts a Number value to a 64-bit floating-point value.
336
327
};
337
328
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
342
330
// / A JavaScript bigint value.
343
331
class BigInt : public Value {
344
332
public:
@@ -377,7 +365,7 @@ namespace Napi {
377
365
// / be needed to store this BigInt (i.e. the return value of `WordCount()`).
378
366
void ToWords (int * sign_bit, size_t * word_count, uint64_t * words);
379
367
};
380
- #endif // NAPI_EXPERIMENTAL
368
+ #endif // NAPI_VERSION > 5
381
369
382
370
#if (NAPI_VERSION > 4)
383
371
// / A JavaScript date value.
@@ -859,13 +847,10 @@ namespace Napi {
859
847
: std::is_same<T, uint32_t >::value ? napi_uint32_array
860
848
: std::is_same<T, float >::value ? napi_float32_array
861
849
: 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
866
851
: std::is_same<T, int64_t >::value ? napi_bigint64_array
867
852
: std::is_same<T, uint64_t >::value ? napi_biguint64_array
868
- #endif // NAPI_EXPERIMENTAL
853
+ #endif // NAPI_VERSION > 5
869
854
: unknown_array_type;
870
855
}
871
856
// / !endcond
0 commit comments