Skip to content

Tern & Completion Guess support

angelozerr edited this page Sep 9, 2015 · 2 revisions

tern-guess-types gives the capability to guess parameter types when completion is applied.

When completion is applied, it's possible to open a second completion with variable which matches the type of the parameter function :

Completion applied

To activate this mode, you must check the Guess Completion tern plugin. After installing and converting your project as Tern Project, go at Tern project property, click on Tern / Modules item and select the Completion Guess tern plugin :

tern completion

After that, when you open a completion :

tern completion

and you apply a completion item (here addEventListener), guess type opens a second popup with variables. In this case string variables are shown, because the first parameter of addEventListener is string type :

Completion applied

Clone this wiki locally