Fork me on GitHub

Is js/BigInt the recommended for big integers in ClojureScript? But it seems not being supported by transit, and in transit spec, there's a BigInteger, however I couldn't find what type in ClojureScript(I know there's a BigInteger in Clojure)?


A small correction - BigInteger exists in Java, not in Clojure. But clojure.core has a function biginteger. Similarly, JavaScript has BigInt, but CLJS does not have biginteger. I don't know for sure why but my bet is that's because BigInt is a relatively recent addition - e.g. in Firefox it has been implemented a little more than 2 years ago. And I guess that's also the reason why it's not supported in Transit. With that being said - yes, you should use js/BigInt for big integers if all your target platforms support it. And you can enable Transit to read and write it with custom handlers - it's designed for extensibility.


How can I enable it in transit, I could not figure out its type.


Sorry, I think I'm wrong. I can extend it now.


Thank you!

👍 1

I'm getting some console errors when I try and submit a form but the submit action also immediately reloads the entire page, thus erasing the console messages. How can I see those error messages? Shadow-cljs doesn't show any errors


if you click on chrome's console settings. there's a "Preserve log" option


That works perfectly, ty!