declarations-js-node
declarations-js-node
is a Node.js module that can scan javascript sources and return the list of declarations. It's useful for creating packages that jump to declarations for IDEs/TextEditors.
Installation
npm install --save declarations-js-node
Features
Scanner
- Supports latest JS syntax
- Supports filePath in
import * from x
- Supports filePath in named and default
require
s andimport
s
API
type Declaration = name: string position: line: number column: number source: name: ?string filePath: ?string position: line: number column: number : Array<Declaration>
Examples
/* @flow */ const readFile =
License
This project is licensed under the terms of MIT License. See the LICENSE file for more info.