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
zachcarter@A-TX39FHTD6 ~/projects/sell-my-car-backend master ● nim -version
Nim Compiler Version 0.18.1 [MacOSX: amd64]
Compiled at 2018-08-22
Copyright (c) 2006-2018 by Andreas Rumpf
active boot switches: -d:release
https://nim-lang.org/docs/jsffi.html#bindMethod.m,typed - exists but users for the JS target are going to either desire a clearer error message here so they know they need to work around this with meta programming, or some type of implementation of bindMethod that also passes arguments to the closure.
Sorry if my summary of the issue was off - please edit to have it make sense.
The text was updated successfully, but these errors were encountered:
Not quite, you just have to wrap with parentheses the return type (proc()) otherwise the importcpp pragma is wrongfully attached to it rather than bindTo.
import jsffi proc bindTo(p: proc(), self: JsObject, args: JsObject): proc() {. importcpp: "bind" .}
results in -
Error: attempting to call undeclared routine: 'importcpp
which is not very clear at all.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_objects/Function/bind#Syntax
https://nim-lang.org/docs/jsffi.html#bindMethod.m,typed - exists but users for the JS target are going to either desire a clearer error message here so they know they need to work around this with meta programming, or some type of implementation of bindMethod that also passes arguments to the closure.
Sorry if my summary of the issue was off - please edit to have it make sense.
The text was updated successfully, but these errors were encountered: