n-api: return napi_invalid_arg on napi_create_bigint_words
N-API statuses shall be preferred over throwing JavaScript Errors on checks occurred in N-APIs.
Refs: https://github.com/nodejs/node/issues/29849
These changes shall not be made on existing N-API. But BigInt related N-API is still an experimental API.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines