src: move napi_addon_register_func to node_api_types.h

This means that `node.h` can include only this file, instead of
the entirety of `node_api.h`.

Split out from https://github.com/nodejs/node/pull/60496 since
it was rightfully pointed out that the breaking part of the change
should not touch Node-API headers.

PR-URL: https://github.com/nodejs/node/pull/60512
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Anna Henningsen authored and Node.js GitHub Bot committed 2025-11-02 14:08:47 +00:00
1 parent 2595dd52a7
commit 85ee01c838
2 files changed
+4 -4

No files matched your search

-4
View File
@@ -33,10 +33,6 @@ struct uv_loop_s; // Forward declaration.
#define NAPI_NO_RETURN
#endif
typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
napi_value exports);
typedef int32_t(NAPI_CDECL* node_api_addon_get_api_version_func)(void);
// Used by deprecated registration method napi_module_register.
typedef struct napi_module {
int nm_version;