New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tern-guess-types

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tern-guess-types

A Tern plugin for guessing types.

  • 0.10.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
decreased by-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

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"
 ]
}

Keywords

FAQs

Package last updated on 20 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc