Get the dependencies of TypeScript module
npm install detective-typescript
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);
skipTypeImports
(default: false) - Skips imports that only imports typesmixedImports
: (default: false) - Include CJS imports in dependency list
MIT