Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ async function _parseTreeAsync(children: Dree[], prefix: string, options: ParseO
* @return {object} The directory tree as a Dree object
* @template Node The type of the tree object, which can be extended and changed by the onFile and onDir functions.
*/
export function scan<Node extends Dree = Dree>(path: string, options?: ScanOptions, onFile?: Callback<Node>, onDir?: Callback<Node>): Node {
export function scan<Node extends Dree = Dree>(path: string, options?: ScanOptions, onFile?: Callback<Node>, onDir?: Callback<Node>): Node | null {
const opt = mergeScanOptions(options);
const root = resolvePath(path, opt);
const result = _scan<Node>(root, root, 0, opt, onFile, onDir);
Expand Down