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

No support for BigInt #53

Open
mzedeler opened this issue Apr 13, 2020 · 1 comment
Open

No support for BigInt #53

mzedeler opened this issue Apr 13, 2020 · 1 comment

Comments

@mzedeler
Copy link

const { toJSON } = require('transit-immutable-js')
const { Map } = require('immutable')
toJSON(Map().set(1n, 'test')

This results in Uncaught TypeError: Cannot use 'in' operator to search for 'toMap' in 1

The same goes for toJSON(Map().set('test', 1n)).

I may be able to add BigInt support if you're open for PRs.'

@glenjamin
Copy link
Owner

Yep, I’ll take a PR - as long as it gracefully skips registering when BigInt is not available.

Alternatively you should be able to add a custom decoder in your application

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

No branches or pull requests

2 participants