tern-def-origin
A tern plugin for determining the definition AST node and origin for JavaScript types.
Usage
To install dependencies, run npm install
.
This plugin requires tern 0.5.1 (which sets the sourceFile
property on AST nodes).
With the tern server
Add this plugin to your .tern-project
file:
With the tern condenser
Load the plugin:
$ node_modules/tern/bin/condense --plugin def-origin testdata/simple.js
You'll see the new !data.aval
and !data.type` key paths on types in the
condensed output:
Running tests
Run npm test
.
Authors
Contributions are welcome! Submit a GitHub issue or pull request.