Skip to content

Commit 064e30c

Browse files
author
Noah Hummel
committed
chore: update README and docstrings
1 parent 149151f commit 064e30c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ var tree = dependencyTree({
2626
entry: 'module'
2727
}, // optional
2828
filter: path => path.indexOf('node_modules') === -1, // optional
29-
nonExistent: [] // optional
29+
nonExistent: [], // optional
30+
noTypeDefinitions: false // optional
3031
});
3132

3233
// Returns a post-order traversal (list form) of the tree with duplicate sub-trees pruned.
@@ -51,6 +52,7 @@ var list = dependencyTree.toList({
5152
* `detective`: object with configuration specific to detectives used to find dependencies of a file
5253
- for example `detective.amd.skipLazyLoaded: true` tells the AMD detective to omit inner requires
5354
- See [precinct's usage docs](https://github.com/dependents/node-precinct#usage) for the list of module types you can pass options to.
55+
* `noTypeDefinitions`: For TypeScript imports, whether to resolve to `*.js` instead of `*.d.ts`.
5456

5557
#### Format Details
5658

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const Config = require('./lib/Config');
2222
* @param {Array} [options.nonExistent] - List of partials that do not exist
2323
* @param {Boolean} [options.isListForm=false]
2424
* @param {String|Object} [options.tsConfig] Path to a typescript config (or a preloaded one).
25+
* @param {Boolean} [options.noTypeDefinitions] For TypeScript imports, whether to resolve to `*.js` instead of `*.d.ts`.
2526
* @return {Object}
2627
*/
2728
module.exports = function(options) {

0 commit comments

Comments
 (0)