Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

n-api documentation does not list minimum version of types #27486

Closed
josephg opened this issue Apr 30, 2019 · 1 comment
Closed

n-api documentation does not list minimum version of types #27486

josephg opened this issue Apr 30, 2019 · 1 comment

Comments

@josephg
Copy link
Contributor

josephg commented Apr 30, 2019

Each type in n-api is only available from some particular n-api version. But the documentation doesn't list the minimum version from which each API is available.

For example, napi_threadsafe_function is only available from NAPI_VERSION 4 onwards. And thus, it can't be used if you're hoping to support older versions of nodejs. But its impossible to know that from the documentation alone - I had to dig into the napi header files to figure out what APIs I can use.


Edit: It looks like the N-API version is listed for functions, just not for types. So this is a pretty minor issue.

@josephg josephg changed the title n-api documentation does not list minimum version of functions n-api documentation does not list minimum version of types Apr 30, 2019
@benjamingr
Copy link
Member

@josephg sounds reasonable to list it on the types and not just the functions to me. Docs PR welcome :]

mhdawson added a commit to mhdawson/io.js that referenced this issue May 17, 2019
Add version info for types in N-API doc.

Fixes: nodejs#27486
@Trott Trott closed this as completed in dd6481a May 26, 2019
targos pushed a commit that referenced this issue May 28, 2019
Add version info for types in N-API doc.

PR-URL: #27754
Fixes: #27486
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants