Skip to content
Get the dependencies of a TypeScript module
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.editorconfig
.eslintrc
.gitignore
.npmignore
.travis.yml
README.md
index.js
package-lock.json
package.json

README.md

detective-typescript Build Status npm npm

Get the dependencies of TypeScript module

npm install detective-typescript

Usage

var detective = require('detective-typescript');

var mySourceCode = fs.readFileSync('myfile.js', 'utf8');

// Pass in a file's content or an AST
var dependencies = detective(mySourceCode);

Options

  • skipTypeImports (default: false) - Skips imports that only imports types
  • mixedImports: (default: false) - Include CJS imports in dependency list

License

MIT

You can’t perform that action at this time.