Skip to content

Commit 3422b62

Browse files
node-api: add warning for NAPI_EXPERIMENTAL
1 parent 02a1505 commit 3422b62

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/js_native_api.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
#endif
2222
#endif
2323

24+
#if defined(NAPI_EXPERIMENTAL) && \
25+
!defined(NODE_API_EXPERIMENTAL_NO_WARNING) && \
26+
!defined(NODE_WANT_INTERNALS)
27+
#warning "NAPI_EXPERIMENTAL is enabled. Experimental features may be unstable."
28+
#endif
29+
2430
#include "js_native_api_types.h"
2531

2632
// If you need __declspec(dllimport), either include <node_api.h> instead, or

0 commit comments

Comments
 (0)