Skip to content
angelozerr edited this page Jun 8, 2015 · 1 revision

tern-guess-types is a plugin which gives the capability to guess parameter types when completion is applied to the JavaSript code intelligence system Tern.

Simple type

If you open tern completion for document and select addEventListener :

Tern completion

When you apply completion, tern guess types gives the capability to retrieve variables, functions for each function parameters. Here a screenshot which shows a list of variable with string type for the addEventListener type argument :

Tern completion

Multi types

If you open tern completion for string and select replace :

Tern completion

The pattern parameter of the replace method can have 2 types :

  • string
  • or RegExp

When you apply completion, tern guess types gives the capability to retrieve variables, functions for each function parameters. Here a screenshot which shows a list of variable with string type for the pattern type argument :

Tern completion

Clone this wiki locally