Skip to content

Commit 4a7b7e8

Browse files
committed
doc: add reference to node_api.h in docs
Realized that we don't actually point people to the file to include in order to access N-API functions. Add that. PR-URL: #13084 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent a63b245 commit 4a7b7e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/n-api.md

+8
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ for the N-API C based functions exported by Node.js. These wrappers are not
5252
part of N-API, nor will they be maintained as part of Node.js. One such
5353
example is: [node-api](https://github.com/nodejs/node-api).
5454

55+
In order to use the N-API functions, include the file
56+
[node_api.h](https://github.com/nodejs/node/blob/master/src/node_api.h)
57+
which is located in the src directory in the node development tree.
58+
For example:
59+
```C
60+
#include <node_api.h>
61+
```
62+
5563
## Basic N-API Data Types
5664

5765
N-API exposes the following fundamental datatypes as abstractions that are

0 commit comments

Comments
 (0)