tern icon indicating copy to clipboard operation
tern copied to clipboard

Polymer(), 'this' not showing any results inside object definition

Open cag-oss opened this issue 11 years ago • 1 comments

On the tern demo, first I add Polymer/polymer/polymer.js and Polymer/platform/platform.js as new files. Then I make a blank file with this code: Polymer('testel', { prop1: "test", func1: function () { this.
} });

No autocomplete shows up for 'this'. I know this issue has come previously, is there some way to tell tern to always treat the object paramer of the Polymer function as a constructor?

cag-oss avatar Jul 11 '14 17:07 cag-oss

Hi, I have a similar situation, does anyone made any progress with this? I tried to made a defs file with something:

'!name': 'polymer', 'Polymer': { '!type': 'fn(proto: +Polymer.Base) -> +Polymer.Base', 'Base': { 'prototype': { 'set': { '!type': 'fn(path: string, value: ?)', '!doc': 'Convenience method for setting a value to a path and notifying any elements bound to the same path.' }}}}

But still no sucess? Any clue of what to do in this case? Thanks.

richardsd avatar Sep 20 '16 14:09 richardsd