-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add jssets #59
Add jssets #59
Conversation
func getFloat*(this: JsSet): seq[float] {.importjs: """ | ||
(() => {const x = []; #.forEach(a => x.push(parseFloat(a))); return x})()""".} | ||
## Convert `JsSet` to `seq[float]`, all items will be converted to `float`. | ||
func toString*(this: JsSet): seq[cstring] {.importjs: """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
making toString
return a seq[cstring] is too surprising. Either remove this or implement $(this: JsSet): string
(string intended, not cstring), that would behave similar to stdlib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juancarlospaco this was marked as resolved but the problem is still there.
Same remark as @Araq's comment here nim-lang/Nim#16409 (comment) except this is worse because it returns a seq[cstring]
@juancarlospaco you're re-requesting a review but #59 (comment) is still un-addressed
still fails, and my review comment says how you can easily fix it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM; we really need to start running CI and nim doc for js in fusion otherwise all those tests are left un-tested
please ask for another LGTM so we can merge this
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
@timotheecour Ping. Also #55 (review) |
Set
for the JavaScript target https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SetSee nim-lang/Nim#16339 (comment) and nim-lang/Nim#16339 (comment) and #57 (comment) and #56 (comment) and #55 (comment)
and #58 (comment)