I am trying to add some features to an existing JavaScript system. To be used again with JavaScript (as opposed to the ClojureScript namespace). Perhaps this is not possible?
Here's a simplification of what I want to do:
String.prototype.foo = function() {
return "bar";
}
String::foo = ->
"bar"
I want to be able to run my script above and then call it from another place in the code.
I tried messing around with extend-typeand defprotocolas well as with export, but nothing showed my foo function.
It may have been a design decision and ClojureScript will not work for me here, but I just wanted to make sure that I didn’t notice anything.
source
share