[ 
https://issues.apache.org/jira/browse/THRIFT-4803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769752#comment-16769752
 ] 

Brian Forbis commented on THRIFT-4803:
--------------------------------------

Would be great if this could eventually use BigInt, which is native in newer 
versions of javascript. BigInt is still in early stages, but various projects 
like Typescript and Babel are working on BigInt transpilation support.

Typescript support: [https://github.com/Microsoft/TypeScript/pull/25886]

Babel support: [https://github.com/babel/proposals/issues/2]

Whatever is ultimately chosen should ideally be future proofed so it could 
easily be replaced with BigInt when it becomes more widely available.

> Fix 64-bit nodejs math by switching from node-int64 to long or bignum
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-4803
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4803
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Node.js - Compiler, Node.js - Library
>    Affects Versions: 0.12.0
>            Reporter: James E. King III
>            Priority: Minor
>              Labels: Breaking-Change
>
> The package node-int64 allows for storage of 64-bit integers but it does not 
> allow for integer arithmetic.  There are solutions for this, for example the 
> packages {{long}}, {{bignum}}, {{bigint}}.  We should switch to one of these, 
> even though it is a breaking change, as it improves i64 behavior.  This would 
> be a breaking change; folks can continue to use 0.12.0 if they don't want to 
> change their code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to