0.10.0 • Published 9 years ago

tern-guess-types v0.10.0

Weekly downloads
14
License
MIT
Repository
github
Last release
9 years ago

Tern guess types

Build Status NPM version

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.

For instance 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

See Features for more informations.

How it works?

document. //addEventListener(type, listener, capture)
var s = "", y = "", z = 10;
var f = function(e) {

}    
var g = function() {

}
var b = true;

JSON request :

{
 "type": "guess-types",
 "file": "#0",
 "end": {
  "ch": 10,
  "line": 0
 },
 "property": "addEventListener",
 "lineCharPositions": true
}

JSON response :

{
 "args": [
  "string",
  "fn(e: Event)",
  "bool"
 ],
 "string": [
  "name",
  "s",
  "y"
 ],
 "fn(e: Event)": [],
 "bool": [
  "true",
  "false",
  "closed",
  "b"
 ]
}
0.10.0

9 years ago

0.9.0

9 years ago

0.8.0

9 years ago

0.7.0

9 years ago

0.6.0

9 years ago

0.5.0

9 years ago

0.4.0

9 years ago

0.2.0

9 years ago

0.1.0

9 years ago