tern icon indicating copy to clipboard operation
tern copied to clipboard

Completion proposals not found for this expression using requirejs

Open mrennie opened this issue 8 years ago • 0 comments
trafficstars

Run the simplified example in the demo.

main.js

requirejs(["lru"], function(lru) {
	function foo() {
            this.cache = new lru(30)
            this.cache.
        }
})

lru.js

define([], function() {
	function LRU(size) {
		//some constructor
               this.name = "me";
	}
	//some prototype bashing
	LRU.prototype.clear = function clear() {
		console.log("hello");	
	};
	return LRU;
});

If you try to get completions for the this.cache. expression nothing is returned - I would expect to see name and clear.

If you change the code to create a local variable instead of a this expression, you see the expected proposals.

mrennie avatar May 11 '17 20:05 mrennie