nodejs / nan

Native Abstractions for Node.js
MIT License
3.27k stars 501 forks source link

How to convert an int64 to NodeJs BigInt. #931

Open UrielCh opened 2 years ago

UrielCh commented 2 years ago

Hi,

I think it's a common issue, but I can not find the answer on the Google.

I want to return BigInt to Nodejs from a C++ int64.

Currently, I'm returning a number but that is not correct.

cbratschi commented 2 years ago

Was looking for this too and run into the same issue. Still using a Uint32 or Int32 as fallback. Strange, that this is not yet available.