napi_get_value_bigint_int64
napi_status napi_get_value_bigint_int64(napi_env env,
napi_value value,
int64_t* result,
bool* lossless); [in] env:API 调用时所处的环境[in] value:表示 JavaScriptBigInt的napi_value。[out] result:给定 JavaScriptBigInt的 Cint64_t原始等价值。[out] lossless:指示BigInt值是否无损转换。
如果 API 成功,则返回 napi_ok。如果传入的不是 BigInt,则返回 napi_bigint_expected。
【Returns napi_ok if the API succeeded. If a non-BigInt is passed in it
returns napi_bigint_expected.】
此 API 返回给定 JavaScript BigInt 的 C int64_t 原始类型等效值。如果需要,它会截断该值,并将 lossless 设置为 false。
【This API returns the C int64_t primitive equivalent of the given JavaScript
BigInt. If needed it will truncate the value, setting lossless to false.】