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

Missing Napi::Value::IsBigInt method #1299

Closed
ghost opened this issue Mar 28, 2023 · 3 comments · Fixed by #1319
Closed

Missing Napi::Value::IsBigInt method #1299

ghost opened this issue Mar 28, 2023 · 3 comments · Fixed by #1319

Comments

@ghost
Copy link

ghost commented Mar 28, 2023

Hi, I see Napi::Value has methods to determine the type of its underlying value, such as IsNumber, IsObject, etc. However, there's no such method for Napi::BigInt, which is a subclass of Napi::Value, at least according to https://github.com/nodejs/node-addon-api/blob/v6.0.0/doc/value.md

This needs to be corrected ASAP.

@mhdawson
Copy link
Member

I'm not sure what version of node-api you are using but it exists for NAPI_VERSION 5 and greater. See

#if NAPI_VERSION > 5

@ghost
Copy link
Author

ghost commented Mar 28, 2023

@mhdawson I see. Why is this not documented in the link I posted?

@mhdawson
Copy link
Member

@martingalvan-nordic probably just an oversight, PRs welcome

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

Successfully merging a pull request may close this issue.

1 participant