detective-typescript-70
v7.0.0
Published
Get the dependencies of a TypeScript module
Downloads
65
Maintainers
Readme
detective-typescript
Get the dependencies of TypeScript module
npm install detective-typescript
Usage
var detective = require('detective-typescript');
var mySourceCode = fs.readFileSync('myfile.ts', 'utf8');
// Pass in a file's content or an AST
var dependencies = detective(mySourceCode);
Options
skipTypeImports
(default: false) Skips imports that only imports typesmixedImports
: (default: false) Include CJS imports in dependency listskipAsyncImports
: (default: false) Whether or not to omit async imports (import('foo'))jsx
: (default: false) Enable parsing of JSX
License
MIT