You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current implementation of clj->js in Squint does not resolve lazy sequences into normal js sequences. Instead, it appears to be a no-op, leaving the sequence as-is. This can lead to unexpected behavior when using lazy sequences, which are a common pattern in cljs.
For example in cljs:
(clj->js (map inc [123]))
; => #js [2 3 4]
But in Squint, the result does not convert into the expected js array.
Describe the solution you'd like
I’d like clj->js in Squint to behave more like its cljs counterpart by resolving lazy sequences into js arrays. Specifically, calling clj->js on a lazy sequence should fully realize it, ensuring the result is a usable js array.
Describe alternatives you've considered
An alternative would be to explicitly replace clj->js with a vec to realize lists
Additional context
This feature would enhance compatibility with existing cljs codebases and improve the developer experience by making clj->js more intuitive.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The current implementation of
clj->js
in Squint does not resolve lazy sequences into normal js sequences. Instead, it appears to be a no-op, leaving the sequence as-is. This can lead to unexpected behavior when using lazy sequences, which are a common pattern in cljs.For example in cljs:
But in Squint, the result does not convert into the expected js array.
Describe the solution you'd like
I’d like
clj->js
in Squint to behave more like its cljs counterpart by resolving lazy sequences into js arrays. Specifically, callingclj->js
on a lazy sequence should fully realize it, ensuring the result is a usable js array.Describe alternatives you've considered
An alternative would be to explicitly replace
clj->js
with avec
to realize listsAdditional context
This feature would enhance compatibility with existing cljs codebases and improve the developer experience by making
clj->js
more intuitive.The text was updated successfully, but these errors were encountered: