Skip to content

Commit

Permalink
Test.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Apr 13, 2019
1 parent c54e3e1 commit 5e09c85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ close() {
if (this.closed) return this;
this.closed = true;

// Memory management
// Memory management.
this._closers.forEach(closerList => closerList.forEach(closer => closer()));
this._closers.clear();
this._watched.clear();
Expand Down
12 changes: 3 additions & 9 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
import * as fs from "fs";
import { EventEmitter } from "events";

/**
* The object's keys are all the directories (using absolute paths unless the `cwd` option was
* used), and the values are arrays of the names of the items contained in each directory.
*/
export interface WatchedPaths {
[directory: string]: string[];
}

export class FSWatcher extends EventEmitter implements fs.FSWatcher {
options: WatchOptions;

Expand All @@ -39,7 +31,9 @@ export class FSWatcher extends EventEmitter implements fs.FSWatcher {
* the `cwd` option was used), and the values are arrays of the names of the items contained in
* each directory.
*/
getWatched(): WatchedPaths;
getWatched(): {
[directory: string]: string[];
};

/**
* Removes all listeners from watched files.
Expand Down

0 comments on commit 5e09c85

Please sign in to comment.