There's nothing useful you can do against that kind of stuff, so I'd recommend you just document your API correctly and if people want to be stupid, them's the break.
I mean nothing stops a java developer from implementing a List throwing some kind of NotImplementedException everywhere (in fact, using `java.util.Collections.unmodifiableList` would be sufficient as that's exactly what it does: throw UnsupportedOperationException on every access to a mutation method, so it's going to blow up any time it's passed to an API which wants to modify the list it's given)
var rope = { color: "red", length: 10 };