Hi,
I'm exploring if it is easy to define a custom scopes in function so you could get auto-complete suggestions not automatically / easily inferred by tern.
Let's say you have a type defined as in a Child.js
function Child() {
}
Child.prototype.add = function() { }
Child.prototype.remove = function() { }
You are running tern in an editor with simply have
function new_method() {
this.add()
}
The use case here is eventually new_method as a prototype to child Child.prototype.new_method, and you wish that typing "this." auto-completes ".add", ".remove", but there is no way tern knows what this will eventually be.
Is there an easy way to specify the custom scope for javascript function new_method so that the auto-complete works? For more context, this was brought up in a discussion in
https://github.com/mrdoob/three.js/pull/665
Any ideas or suggestions would be great!
Thanks,
Joshua