Skip to content

Commit 75e91fe

Browse files
mhdawsonMylesBorins
authored andcommitted
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. Backport-PR-URL: #19447 PR-URL: #13084 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 70281ba commit 75e91fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/n-api.md

Lines changed: 8 additions & 0 deletions
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)